Pagini recente » Borderou de evaluare (job #1735179) | Cod sursa (job #2231402) | Borderou de evaluare (job #1915461) | Borderou de evaluare (job #2694603) | Cod sursa (job #2762903)
#include <fstream>
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
const long long int MOD = 1999999973;
int power(int b, int e) {
if (e == 0)
return 1;
int r=power(b,e/2)%MOD;
r=(r*r)%MOD;
if(e%2==1)
r=(r*b)%MOD;
return r%MOD;
}
long long int a, b;
int main() {
fin >> a >> b;
a%=MOD;b%=MOD;
fout << power(a, b) % MOD;
return 0;
}