SDUT_王小二切饼_递推
2018-03-12 10:27
253 查看
王小二切饼
Time Limit: 1000 ms Memory Limit: 65536 KiB[align=center]Submit Statistic[/align]Problem Description
王小二自夸刀工不错,有人放一张大的煎饼在砧板上,问他:“饼不许离开砧板,切n(1<=n<=100)刀最多能分成多少块?”Input
输入切的刀数n。Output
输出为切n刀最多切的饼的块数。Sample Input
100
Sample Output
5051
Hint
#include<stdlib.h> #include<stdio.h> int main(){ int n; while(scanf("%d",&n)!=EOF&&n!=0){ printf("%d\n",n*(n+1)/2+1); } return 0; }
相关文章推荐
- 递推递归--B王小二切饼
- 递推递归练习 B - 王小二切饼
- 递推递归专题 B第二题 王小二切饼
- 递归递推练习―B―王小二切饼
- 递推之王小二切饼
- 递推D 王小二切饼
- 递推递归练习B - 王小二切饼
- 递归与递推——B-王小二切饼,D-汉诺塔系列1,I-蟠桃记,H-巴蜀之危,G-fighting小银考四级
- 递归递推练习 -b 王小二切饼/HDU折线分割平面
- 递推递归练习 B 王小二切饼
- ACM-递归递推练习B-王小二切饼
- 递推递归练习--B(王小二切饼)
- B - 王小二切饼
- 《递归递推练习》B - 王小二切饼
- SDUT_母牛的故事_递推
- SDUT_骨牌铺方格_递推
- 王小二切饼
- 王小二切饼
- 王小二切饼
- B - 王小二切饼