Submission #19686

#TimeUsernameProblemLanguageResultExecution timeMemory
19686onjo0127괄호 (kriii4_R)C++98
0 / 100
1 ms4988 KiB
#include <stdio.h> int dp[1000009]; int main() { int n,k,i; scanf("%d %d",&n,&k); if(n==1) { printf("1"); return 0; } if(n%2) { printf("2"); return 0; } dp[0] = 1; dp[1] = 1; for(i=2;i<=n;i+=2) { dp[i] = dp[i-2] + 1; } printf("%d",dp[n]); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...