Pagini recente » Cod sursa (job #2414384) | Diferente pentru winter-challenge-1 intre reviziile 30 si 2 | Borderou de evaluare (job #3283888) | Cod sursa (job #1727102) | Cod sursa (job #2143526)
#include <fstream>
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
long long a,b,MOD=1999999973;
int rise(long long a, long long b) {
if(b == 0) return 1;
long x = rise(a, b / 2);
if(b % 2 == 0) return (x * x) % MOD;
return (((x * x) % MOD) * a) % MOD;
}
int main()
{fin >> a >> b;
fout<<rise(a,b);
return 0;
}