Twin Brothers and Coupons
All submissions for this problem are available.
There are 6 twin brothers A1 A2. B1 B2. C1 C2. D1 D2. E1 E2. F1 F2 and there is one common friend G who does not have a twin brother.
A1 and A2 are twins, B1 and B2 are twins and so on.
So, there are altogether 13 people going for the festival.
They all go to the college fest Saturnalia, and as you all know there are stalls and you need to buy coupons for games at the stall.
Now they want to play the game and so they buy N coupons for a particular game stall.
What is the total number of ways in which they can distribute the coupons considering that the twin brothers get equal no. of coupons.
Different twins can have different number of coupons but the twin brothers must have the same number of coupons.
Each person must get atleast one coupon.
The first line contains a single integer T denoting the number of test cases.
Then T lines follow.
Each of the lines contain a single integer N denoting the number of coupons bought.
For each test case, Output the number of ways of distributing the N coupons, modulo 10^9+7 in a single line.
Should contain all the constraints on the input data that you may have. Format it like:
- 1 ≤ T ≤ 10
- 1 ≤ N ≤ 10^6
Input: 3 10 13 15 Output: 0 1 7
Example case 2.Each person gets one coupon, that's the only way.
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, CLOJ, FS|
Fetching successful submissions