Ashna and Crayons

3.7

7 votes
Problem

Problem Statement:

Ashna likes to play with crayons a lot. She has n crayons with her. One day she decided to arrange the crayons in a straight line on a board. The board can accommodate exactly n crayons. While she is arranging the crayons, she realizes that there are multiple ways in which she can arrange them. Now, she wants to know in how many distinct patterns can she make. So, she asks you for your help. Can you tell her the total number of such patterns?


Input:

The first line contains T which denotes the number of test cases.
Each test case has 1 line which contains an integer n that is the number of crayons that Ashna has.


Output:

For each test case, print an integer answer. Each answer should be on a new line.


Constraints:

1<=T<=20
0<=n<=15

Time Limit: 1
Memory Limit: 256
Source Limit:
Explanation

In the first test case, n=1 i.e. Asha has only 1 crayon. Hence, she can arrange the crayon in only 1 way.

In the second test case, Ashna has 3 crayons. Suppose the colour of the crayons are : Red, Green and Blue.
She can arrange them in her board in the following different ways:
Red, Green, Blue
Red, Blue, Green
Green, Blue, Red
Green, Red, Blue
Blue, Red, Green
Blue, Green, Red
Thus, there are 6 ways in which she can arrange the 3 crayons.

Editor Image

?