All submissions for this problem are available.
Alice has been recruited as a new Professor at IIT Kanpur. There are a total of n+1 students in her class each having a unique rank in the range 0 to n. Each student gives a choice of having nCr assignments (r is the unique rank of that student), where nCr is the coefficient of the rth term in the expansion of (1+x)n.
Alice loves her students so much that she wants her students to learn and do as many assignments as possible. She has gone crazy and thus she wants to give the minimum number (K, the same for all students) of assignments to each of her student, where K is divisible by the number of assignments requested by each of her students.
She asks you for help. Help her to find the number of assignments she needs to give.
As the answer can be very large, output it modulo 109+7.
The first line of the input contains an integer T denoting the number of test cases. This is followed by T lines each containing an integer n.
One line for each test case, giving the number of assignments (K) Alice needs to give to her students.
- T ≤ 105
- 1 ≤ n ≤ 105
Input: 3 1 4 5 Output: 1 12 10
|Time Limit:||1.07006 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, JAVA, GO|
Fetching successful submissions