Pagini recente » Monitorul de evaluare | Diferente pentru problema/ciclueuler intre reviziile 10 si 9 | Diferente pentru minimal-enclosing-circle intre reviziile 33 si 32 | Cod sursa (job #1169550) | Cod sursa (job #2144931)
#include <bits/stdc++.h>
using namespace std;
ifstream fin ("lgput.in");
ofstream fout ("lgput.out");
const int Mod = 1999999973;
int main()
{
int n , p , s;
fin >> n >> p;
s = 1;
while(p > 0)
{
if(p & 1)
s = 1LL * s * n % Mod;
p /= 2;
n = 1LL * n * n % Mod;
}
fout << s << "\n";
fin.close();
fout.close();
return 0;
}