Number of Ways
Posted: 31 Dec, 2020
Consider a game in which players can choose any of the three coins => 3 or 5 or 10 in a move. There is an infinite supply of all the three types of coins. Given a total amount ‘N’, find the distinct combinations which sums up to 'N'.
3,5 and 5,3 are not distinct combinations.
The first line of input contains an integer ‘T’ denoting the number of test cases. The first and only line of each test case contains an integer ‘N’ , the total amount.
For each test case, return the number of distinct combinations to reach the total amount is printed.
You do not need to print anything, it has already been taken care of. Just implement the given function.
1 <= T <= 10 1 <= N <= 5 * 10^4 Time Limit: 1 sec