Cod sursă (job #813738)

Utilizator avatar patricksavin Savin Patrick Alexandru patricksavin IP ascuns
Problemă 2sah (clasele 11-12) Compilator cpp-32 | 0,39 kb
Rundă Arhiva de probleme Status evaluat
Dată 11 mar. 2025 13:52:20 Scor 0
#include <iostream>
#include <fstream>
#include <cmath>
using namespace std;
ifstream fin("2sah.in");
ofstream fout("2sah.out");
#define cin fin
#define cout fout
#define mod 100003
long long n,k,m;
int main()
{
    int c;
    cin >> c;
    cin >> n >> k;
    m=2*n+1;
    n++;
    if(c==1)
    {
        long long rez=pow(3,k);
        cout << rez%mod;
    }
    return 0;
}