Pagini recente » Diferente pentru problema/bribe intre reviziile 14 si 15 | Cod sursa (job #2647630) | Cod sursa (job #1911825) | Cod sursa (job #1514078) | Cod sursa (job #2415818)
#include <bits/stdc++.h>
using namespace std;
const int mod = 1999999973;
int pow(int baza, int exp){
int ans = 1;
while(exp){
if(exp % 2 == 1){
ans *= baza;
ans %= mod;
}
baza *= baza;
baza %= mod;
exp /= 2;
}
return ans;
}
int main()
{
ifstream fin("lgput.in");
ofstream fout("lgput.out");
int b, e;
fin >> b >> e;
fout << pow(b, e);
return 0;
}