|
||||||||||
PartitionTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2214 Accepted Submission(s): 1307 Problem Description How many ways can the numbers 1 to 15 be added together to make 15? The technical term for what you are asking is the "number of partition" which is often called P(n). A partition of n is a collection of positive integers (not necessarily distinct) whose sum equals n. Now, I will give you a number n, and please tell me P(n) mod 1000000007. Input The first line contains a number T(1 ¡Ü T ¡Ü 100), which is the number of the case number. The next T lines, each line contains a number n(1 ¡Ü n ¡Ü 105) you need to consider. Output For each n, output P(n) in a single line. Sample Input
Sample Output
Source | ||||||||||
|