Pagini recente » Cod sursa (job #1102993) | Cod sursa (job #913638) | Cod sursa (job #1233764) | Cod sursa (job #967673) | Cod sursa (job #2949461)
#include <bits/stdc++.h>
#define MOD 1999999973
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
int a,b;
int putere(int a, int b)
{
int p;
p = 1;
while(b > 0)
{
if(b % 2 == 1) p = 1LL * p * a % MOD;
b/=2;
a = 1LL * a * a % MOD;
}
return p;
}
int main()
{
fin >> a >> b;
fout << putere(a,b);
fin.close();
fout.close();
return 0;
}