Submission #19309

# Submission time Handle Problem Language Result Execution time Memory
19309 2016-02-24T09:21:42 Z exqt Α (kriii4_P1) C++
0 / 100
0 ms 1716 KB
#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
1 Incorrect 0 ms 1716 KB Output isn't correct
2 Halted 0 ms 0 KB -