Pagini recente » Cod sursa (job #167533) | Cod sursa (job #200610) | Cod sursa (job #2262718) | Monitorul de evaluare | Cod sursa (job #2415792)
#include <fstream>
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
const int MOD = 1999999973;
int RidPut(int base, int exp)
{
long long ans = 1;
long long aux = base;
for(int i = 1; i <= exp; i <<= 1)
{
if(i & exp)
ans = (1LL * ans * aux) % MOD;
aux = (1LL * aux * aux) % MOD;
}
return ans % MOD;
}
int main()
{
int N, K;
fin >> N >> K;
fout << RidPut(N, K) << '\n';
return 0;
}