Login

All Problems

Problem title

Difficulty

Avg time to solve

Binary Linked List To Integer

Easy

--

Number of Ways

Moderate

35 mins

Double Strings

Hard

35 mins

Kevin And Set Of Strings

Hard

55 mins

Ninja And His Secret Information

Moderate

30 mins

Winner Of Candies

Easy

20 mins

Make Array Elements Equal

Moderate

25 mins

Create A Matrix With Alternating X And 0

Easy

15 mins

The Hero Test - 1

Easy

15 mins

Pair Sum in BST.

Easy

15 mins

Problem

Submissions

1

Avg. time to solve

35 min

Success Rate

65%

Problem Statement

```
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
```

```
1
8
```

```
1
```

```
{3,5} and {5,3} are two possible permutations but these represent the same combination. Thus, the output is 1.
```

```
2
20
13
```

```
4
2
```

```
For test case 1 : N = 20
Possible distinct combinations are :
3 3 3 3 3 5
5 5 5 5
5 5 10
10 10
For test case 2 : N = 13
Possible distinct combinations are :
3 5 5
3 10
```

Console

Sample Test Case

Custom Test Case

Download Test Cases

Test Case 1

Test Case 2

Test Case 3

Saving Code...

Full Screen Mode

Change Language

Change Theme

Solution submission not allowed

Save Code

Reset Code