# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
19242 | kaTkaHr | Α (kriii4_P1) | C++14 | 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 <stdio.h>
#include <algorithm>
#include <map>
using namespace std;
typedef long long ll;
const int MM = 1000000007;
int main()
{
ll A, B, R = 1;
scanf("%lld%lld", &A, &B); A %= MM;
while(B){
if( B&1 ) R = R * A % MM;
B /= 2; A = A * A % MM;
}
printf("%lld\n", R);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |