Submission #19626

#TimeUsernameProblemLanguageResultExecution timeMemory
19626201023777Α (kriii4_P1)C++98
0 / 100
0 ms1720 KiB
#include <cstdio> #include <iostream> using namespace std; long long int a,b,c; int yukariko(long long int A,long long int B){ if(B==0) return 1; if(B==1) return A%c; if(B%2==0) return yukariko((A*A)%c,B/2); else return (A*yukariko((A*A)%c,(B-1)/2))%c; } int main(){ c=1000000007; scanf("%lld%lld",&a,&b); printf("%d",yukariko(a,b)); }
#Verdict Execution timeMemoryGrader output
Fetching results...