delete pics to save space
This commit is contained in:
12
1.1028.cpp
Normal file
12
1.1028.cpp
Normal file
@ -0,0 +1,12 @@
|
||||
#include<cstdio>
|
||||
int n,cnt=1,i,f[1010];
|
||||
int main()
|
||||
{
|
||||
scanf("%d",&n);
|
||||
f[0]=f[1]=1;
|
||||
for(i=2;i<=n;i++)
|
||||
if(i&1) f[i]=f[i-1];
|
||||
else f[i]=f[i-1]+f[i/2];
|
||||
printf("%d\n",f[n]);
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user