Pagini recente » Cod sursa (job #397598) | Cod sursa (job #1009679) | Cod sursa (job #2156645) | Cod sursa (job #1620853) | Cod sursa (job #2918866)
#include <fstream>
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
long long power(long long a, long long b, long long c)
{
long long p = 1LL;
while(b > 0)
{
if(b % 2 == 1)
p = ((p % c) * (a % c)) % c;
a = ((a % c) * (a % c)) % c;
b >>= 1;
}
return p;
}
int main()
{
long long a, b;
fin >> a >> b;
const int c = 1999999973;
fout << power(a, b, c);
return 0;
}