Pagini recente » Cod sursa (job #1400123) | Cod sursa (job #1112048) | Cod sursa (job #816572) | Diferente pentru problema/memcpy intre reviziile 21 si 22 | Cod sursa (job #1917738)
#include <iostream>
#include <fstream>
#define MOD 1999999973
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
int main()
{
long long x, y, r = 1;
fin>>x>>y; // calculam x la puterea y
while(y) {
if (y&1) {
r = (r * x) % MOD;
}
y = y >> 1;
x = (x * x) % MOD;
}
fout<<r;
fin.close();
fout.close();
return 0;
}