Pagini recente » Cod sursa (job #216583) | Borderou de evaluare (job #2675092) | Cod sursa (job #911081) | Borderou de evaluare (job #1524566) | Cod sursa (job #2718307)
#include <fstream>
#define ll long long
#define mod 1999999973
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
int main()
{
ll a, b;
fin >> a >> b;
ll rez = 1, x = a % mod;
while(b)
{
if (b % 2 == 1) rez = (rez * x) % mod;
x = (x * x) % mod;
b /= 2;
}
fout << rez % mod;
fin.close();
fout.close();
return 0;
}