Submission #19582

#TimeUsernameProblemLanguageResultExecution timeMemory
19582gs12117Α (kriii4_P1)C++98
100 / 100
0 ms1084 KiB
#include<stdio.h> int mod=1000000007; long long int f(long long int x,long long int y){ if(y==0)return 1; long long int r=f(x,y/2); r*=r; r%=mod; if(y%2==0)return r; r*=x; r%=mod; return r; } int main(){ long long int a,b; scanf("%lld%lld",&a,&b); printf("%lld",f(a%mod,b)); }
#Verdict Execution timeMemoryGrader output
Fetching results...