# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
19366 |
2016-02-24T10:44:29 Z |
kdh9949 |
Α (kriii4_P1) |
C++ |
|
0 ms |
1084 KB |
#include <cstdio>
#include <algorithm>
using namespace std;
typedef long long ll;
ll a, b, t, ans = 1;
ll mod = 1000000007;
int main(){
scanf("%lld%lld", &a, &b);
t = a % mod;
for(ll i = 0; (1ll << i) <= b; i++){
if(b & (1 << i)) ans *= t, ans %= mod;
t *= t;
t %= mod;
}
printf("%lld", ans);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1084 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |