This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |