# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
19309 | exqt | Α (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>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <utility>
#include <queue>
#include <string>
#include <cstring>
#include <map>
using namespace std;
#define in cin
#define out cout
#define ll long long
ll DV = 1e9+7;
int main()
{
ll a, b; in >> a >> b;
ll t = a;
ll res = 1;
while(b)
{
if(b%2) res = (res * t) % DV;
t = (t*t) % DV;
b /= 2;
}
out << res;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |