# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
19384 |
2016-02-24T11:06:57 Z |
inspire12 |
Α (kriii4_P1) |
C++ |
|
0 ms |
1084 KB |
#include <cstdio>
#include <math.h>
int res; int num;
int main() {
int n, m, i, x = 0;
scanf("%d", &n);
scanf("%d", &m);
for (i = 128; i >= 1; i /= 2) {
if (m - i > 0) m -= i, x += i;
if (m - i == 0) {
x += i;
break;
}
}
unsigned long long res = 1;
for (i = 1; i <= x; i++) {
res = (res * n) % 1000000007;
} printf("%lld", res% 1000000007);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1084 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |