TouchStone
  Please Login
Login Sign Up
 Homepage  Problem Set  Examinations  Submissions  Discussions  Statistics
  • Home
  • Problem Set
  • P5900
  • Problem
  • P5900自然数拆分+
    Limits : Time Limit : 10000 MS   Memory Limit : 10240 KB
    Description

    把n拆分成若干个互不相同的自然数之和,顺序不同的拆分视为同一种方法,计算方案数mod 1,000,000,007的结果。

    Input Format

    输入一个整数n

    Output Format

    输出方案数mod 1,000,000,007的结果

    Sample Input 1

    6

    Sample Output 1

    4

    Sample Input 2

    7

    Sample Output 2

    5

    Hint

    n<=105

    6 = 6
    6 = 5 + 1
    6 = 4 + 2
    6 = 3 + 2 + 1

    7 = 7
    7 = 6 + 1
    7 = 5 + 2
    7 = 4 + 3
    7 = 4 + 2 + 1


    Source  感谢nodgd