Pagini recente » Cod sursa (job #1510840) | Cod sursa (job #1536825) | Cod sursa (job #1856380) | Diferente pentru problema/royfloyd intre reviziile 10 si 11 | Cod sursa (job #2143521)
#include <iostream>
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
int a,b,MOD=1999999973;
int rise(int a, int b) {
if(b == 0) return 1;
int 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;
}