Geeksforgeeks

Error

×

Leaderboard

Showing:

Handle | Score |
---|---|

@Ibrahim Nash | 6420 |

@blackshadows | 6376 |

@mb1973 | 5604 |

@Quandray | 5231 |

@akhayrutdinov | 5111 |

@saiujwal13083 | 4510 |

@sanjay05 | 3762 |

@kirtidee18 | 3673 |

@marius_valentin_dragoi | 3522 |

@sushant_a | 3459 |

@verma_ji | 3413 |

Complete Leaderboard | |

Handle | Score |

@codersgroup18 | 799 |

@sriramgoparaju99 | 737 |

@Manikanta punnam | 629 |

@rdakka | 606 |

@prankursharma31 | 597 |

@praveenbgp6 | 546 |

@sanskar94511 | 531 |

@purohitmn02 | 529 |

@yashkaril4 | 517 |

@abhikarshgupta | 474 |

@rohitgarg2825 | 464 |

Complete Leaderboard |

Consider a game where a player can score **3** or **5** or **10** points in a move. Given a total score **n**, find number of distinct combinations to reach the given score.

**Input:**

The first line of input contains an integer **T** denoting the number of test cases. T testcases follow.The first line of each test case is **n**.

**Output:**

For each testcase, in a new line, print **number of ways/combinations** to reach the given score.

**Constraints:**

1 ≤ **T** ≤ 100

1 ≤ **n** ≤ 1000

**Example:**

**Input**

3

8

20

13

**Output**

1

4

2

**Explanation**

__For 1st example when n = 8__

{ 3, 5 } and {5, 3} are the two possible permutations but these represent the same cobmination. Hence output is 1.

Login to report an issue on this page.

We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?

Yes
Reach a given score

...