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