Pagini recente » Borderou de evaluare (job #1830073) | Cod sursa (job #2445154) | Diferente pentru utilizator/wormhole intre reviziile 3 si 1 | Cod sursa (job #2891024)
#include <iostream>
#include <fstream>
using namespace std;
ifstream in("lgput.in");
ofstream out("lgput.out");
const int mod = 1999999973;
#define ll long long
int lgput(int a, int b) {
if (!b)
return 1;
if (b % 2 == 1)
return (1LL * a * lgput(a, b - 1)) % mod;
int P = lgput(a, b / 2);
return (1LL * P * P) % mod;
}
int main()
{
int a, b;
in >> a >> b;
out<<lgput(a, b);
}