# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
19367 |
2016-02-24T10:48: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(int i = 0; (1ll << i) <= b; i++){
if(b & (1 << i)) ans *= t, ans %= mod;
t *= t;
t %= mod;
}
printf("%lld\n", ans);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1084 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |