# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
19391 |
2016-02-24T11:09:39 Z |
inspire12 |
Α (kriii4_P1) |
C++ |
|
0 ms |
1084 KB |
#include <cstdio>
int main() {
int n, m, i, x = 0;
scanf("%d", &n);
scanf("%d", &m);
for (i = 100000; 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 |
- |