# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
19603 | jeapi | Α (kriii4_P1) | C++98 | 0 ms | 1716 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<iostream>
using namespace std;
typedef long long ll;
ll Pow(ll a, ll b) {
if (b == 1) {
return a;
}
ll temp = Pow(a, b / 2);
ll Temp = temp*temp % 1000000007;
if (b % 2 == 0) {
return Temp;
}
return (Temp*a) % 1000000007;
}
int main() {
ll a, b;
cin >> a >> b;
cout << Pow(a, b) << ' ';
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |