# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
19392 | kdh9949 | Α (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 <cstdio>
#include <algorithm>
using namespace std;
typedef long long ll;
ll a, b;
ll mod = 1000000007;
ll pw(ll x, ll k){
if(k == 0) return 1;
if(k == 1) return x;
ll t = pw(x, k / 2); t *= t; t %= mod;
if(k % 2) return t * x % mod;
return t;
}
int main(){
scanf("%lld%lld", &a, &b);
printf("%lld\n", pw(a % mod, b));
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |