Pagini recente » Diferente pentru utilizator/spiriflaviu intre reviziile 21 si 22 | Diferente pentru propuneri/2-concurs-studenti intre reviziile 27 si 26 | Profil BursucelCNAI | Cod sursa (job #508788) | Cod sursa (job #3146096)
#include <bits/stdc++.h>
using namespace std;
ifstream f ("lgput.in");
ofstream g ("lgput.out");
long long n,p;
long long exp (long long x, long long n)
{
if(n==0)
return 1;
if(n%2==0)
return exp(x*x,n/2);
else return x*exp(x*x,(n-1)/2);
}
long long mod=1999999973;
int main()
{
f>>n>>p;
g<<exp(n,p)%mod;
return 0;
}