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