# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
19308 | onjo0127 | Α (kriii4_P1) | C++98 | 0 ms | 1084 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<stdio.h>
#define N 1000000007
long long int a,b,ans=1;
long long int dt[60];
int main()
{
int z;
scanf("%lld %lld",&a,&b);
dt[0]=1;
dt[1]=a;
for(z=2;z!=60;z++)
dt[z]=(dt[z-1]*dt[z-1])%N;
for(z=1;z!=60;z++){
if(b%2)ans=(ans*dt[z])%N;
b/=2;
}
printf("%lld",ans);
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |