Given a natural number N, find the number of ways in which N can be expressed as a sum of natural numbers when order is taken into consideration. Two sequences that differ in the order of their terms define different compositions of their sum.
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case contains a number N as input.
For each test case, print the total number of ways in new line.
1 <= T <= 50
1 <= N <= 64
Input : 4 Output : 8 All 8 position composition are: 4, 1+3, 3+1, 2+2, 1+1+2, 1+2+1, 2+1+1 and 1+1+1+1
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.