| 比赛 | test2 | 评测结果 | AAAAA |
|---|---|---|---|
| 题目名称 | 数的计算 | 最终得分 | 100 |
| 用户昵称 | Marshmello | 运行时间 | 0.001 s |
| 代码语言 | C++ | 内存使用 | 0.29 MiB |
| 提交时间 | 2017-03-12 19:27:21 | ||
#include<cstdio>
using namespace std;
int main()
{
freopen("nums.in","r",stdin);
freopen("nums.out","w",stdout);
int a[1001];
int n;
a[1]=1;
scanf("%d",&n);
for(int i=2;i<=n;i++)
{
a[i]=0;
for(int j=1;j<=i/2;j++)
{
a[i]+=a[j];
}
a[i]++;
}
printf("%d",a[n]);
}