#include <stdio.h>
long long coin[251] = { 0, 1, 1, };
const long long int MOD = 1000000007;
int main(){
int N;
scanf("%d", &N);
for(int i = 3; i<=N; i++){
coin[i] = (1 << (i-2)) % MOD;
}
printf("%lld\n", coin[N]);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
1084 KB |
Output is correct |
2 |
Correct |
0 ms |
1084 KB |
Output is correct |
3 |
Correct |
0 ms |
1084 KB |
Output is correct |
4 |
Correct |
0 ms |
1084 KB |
Output is correct |
5 |
Correct |
0 ms |
1084 KB |
Output is correct |
6 |
Incorrect |
0 ms |
1084 KB |
Output isn't correct |
7 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Halted |
0 ms |
0 KB |
- |