Submission #19307

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