Task
You are given a number N. You are asked to find the number of sequences a1,…,ak such that a1∣a2∣…∣ak (that is, a1 divides a2, which divides a3, and so on), and N=a1+⋯+ak.
For example, if N=6, then we have the following values for a1,…,ak:
- 6;
- 1,5;
- 1,1,4;
- 1,1,1,3;
- 1,1,1,1,2;
- 1,1,1,1,1,1;
- 1,1,2,2;
- 2,4;
- 2,2,2;
- 3,3.
Hence the answer would be: 10.
The first line in the input data contains the number of test cases T. The T lines that follow contain the values of N for which you must compute the answer.
Output data
Output T lines, the answers for the T values of N you are given. Since these answers are quite large, output their remainder modulo 109+7.
Constraints and clarifications
- 1≤T≤100 000;
- 1≤N≤500 000.
# |
Points |
Restrictions |
1 |
12 |
N≤20 |
2 |
21 |
N≤100 |
3 |
33 |
N≤1 000 |
4 |
34 |
No further restrictions. |
Example
stdin
3
6
10
500000
stdout
10
26
475702494
Explanation
The first test case is explained in the problem description. For N=10 the answers are:
- 10;
- 1,9;
- 1,1,8;
- 1,1,1,7;
- 1,1,1,1,6;
- 1,1,1,1,1,5;
- 1,1,1,1,1,1,4;
- 1,1,1,1,1,1,1,3;
- 1,1,1,1,1,1,1,1,2;
- 1,1,1,1,1,1,1,1,1,1;
- 1,1,1,1,1,1,2,2;
- 1,1,1,1,2,4;
- 1,1,1,1,2,2,2;
- 1,1,1,1,3,3;
- 1,1,2,6;
- 1,1,2,2,4;
- 1,1,2,2,2,2;
- 1,1,4,4;
- 1,3,6;
- 1,3,3,3;
- 2,8;
- 2,2,6;
- 2,2,2,4;
- 2,2,2,2,2;
- 2,4,4;
- 5,5.
So the answer is 26.