Pagini recente » Monitorul de evaluare | Monitorul de evaluare | Diferente pentru problema/treespotting intre reviziile 10 si 9 | Diferente pentru problema/kinetic intre reviziile 10 si 2 | Cod sursa (job #2718305)
#include <fstream>
#define ll long long
#define mod 1999999973
using namespace std;
ifstream fin("strmatch.in");
ofstream fout("strmatch.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;
}