Pagini recente » Diferente pentru problema/trapeze intre reviziile 4 si 8 | Atasamentele paginii Profil andreeacristina | Cod sursa (job #1659177) | Cod sursa (job #1231527) | Cod sursa (job #1919838)
#include <cstdio>
using namespace std;
const int mod=1999999973;
int rid_put(int a,int b)
{
int sol=1;
for(int i=0;(1<<i)<=b;i++)
{
if(b&(1<<i)) sol=(1LL*sol*a)%mod;
a=(1LL*a*a)%mod;
}
return sol;
}
int main()
{
freopen("lgput.in","r",stdin);
freopen("lgput.out","w",stdout);
int n,p;
scanf("%d%d",&n,&p);
printf("%d",rid_put(n,p));
return 0;
}