| 记录编号 | 412779 | 评测结果 | AAAAA | ||
|---|---|---|---|---|---|
| 题目名称 | 1415.[NOIP 2001]数的计算 | 最终得分 | 100 | ||
| 用户昵称 | 是否通过 | 通过 | |||
| 代码语言 | C++ | 运行时间 | 0.001 s | ||
| 提交时间 | 2017-06-09 21:13:30 | 内存使用 | 0.32 MiB | ||
#include<cstdio>
#include<iostream>
using namespace std;
int n,da[1001]={0};
int find(int x)
{
if(da[x]>0)return da[x];
da[x]=1;
for(int i=1;i<=x/2;i++)da[x]+=find(i);
return da[x];
}
int main()
{
freopen("nums.in","r",stdin);
freopen("nums.out","w",stdout);
scanf("%d",&n);
da[1]=1;
printf("%d",find(n));
return 0;
}