A |
Game of Blocks |
|
Input |
Standard Input |
|
Output |
Standard Output |
John decided to buy his son Johnny some mathematical toys. One of his most favorite toy is blocks of different colors. John has decided to buy blocks of C different colors. For each color he will buy googol (10100) blocks. All blocks of same color are of same length. But blocks of different color may vary in length.
Jhonny has decided to use these blocks to make a large 1 x n block. He wonders how many ways he can do this. Two ways are considered different if there is a position where the color differs. The example shows a red block of size 5, blue block of size 3 and green block of size 3. It shows there are 12 ways of making a large block of length 11.
|
|
Sample Input |
Sample Output |
4 |
Case
1: 12 Case
2: 20634244 Case
3: 94126777 Case
4: 243 |
Problemsetter:
Tanaeem M Moosa, Special Thanks: Md. Arifuzzaman Arif