# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
19448 | noslaak | Α (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>
const int LN = 1000000007;
int main()
{
while(!std::cin.eof())
{
long long A, X, acc = 1;
std::cin >> A >> X;
while(X)
{
if(X%2)
acc = (acc*A)%LN;
A = (A*A)%LN;
X /= 2;
}
std::cout << acc;
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |