# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
19530 | 2016-02-24T16:18:43 Z | jihoon | Α (kriii4_P1) | C++ | 0 ms | 0 KB |
#include<cstdio> long long a,x,ans,gop; int main(){ scanf("%lld\n%lld",&a,&x); gop=x; ans=1; while(x){ if(x&1){ans*=gop;ans%=je;} x >>= 1;gop*=gop;gop%=je; } printf("%lld",ans); }