Pagini recente » Cod sursa (job #2256069) | Cod sursa (job #519180) | Cod sursa (job #2405938) | Monitorul de evaluare | Cod sursa (job #1169721)
#include <fstream>
using namespace std;
ifstream fin("lgput.in");
ofstream fout("lgput.out");
//ofstream fdeb("console.out");
int a, b;
int mod = 1999999973;
void solve(int a, int b)
{
//fdeb << "a: " << a << " b: " << b << "\n";
long long x, y = 1;
x = a;
for(int i = 0; (1 << i) <= b; i++)
{
if(((1 << i) & b) > 0)
y = (y * x) % mod;
x = (x * x) % mod;
}
//fdeb << y;
fout << y;
}
void read()
{
fin >> a >> b;
solve(a, b);
}
int main()
{
read();
return 0;
}