拆分数
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
说明
整数n(n<=120)拆分成1,2,3…n的和,且允许重复,求总共的拆分数。以4为例:
4=4;
4=3+1;
4=2+2;
4=2+1+1;
4=1+1+1+1;
其中3+1与1+3属于同一种,因此整数4的拆分数有5种。
输入格式
输入包含多个测试用例。每个测试用例包含一个正整数N(1 < = N < = 120),EOF表示输入终止。输出格式
对于每个测试用例,你必须输出一行包含一个整数P,表明拆分数个数。4
10
205
42
627
来源
入门题-数学 洛谷2026-1-8-吉利学院寒假实训周-上机实践-3
- Status
- Done
- Rule
- XCPC
- Problem
- 5
- Start at
- 2026-1-8 13:30
- End at
- 2026-1-8 16:30
- Duration
- 3 hour(s)
- Host
- Partic.
- 44