GUPTA MECHANICAL

IN THIS WEBSITE I CAN TELL ALL ABOUT TECH. TIPS AND TRICKS APP REVIEWS AND UNBOXINGS ALSO TECH. NEWS .............

Saturday 30 July 2022

[Solution] Minimum Coins CodeChef Solution



There are only 2 type of denominations in Chefland:

  • Coins worth 1 rupee each
  • Notes worth 10 rupees each

Chef wants to pay his friend exactly X rupees. What is the minimum number of coins Chef needs to pay exactly X rupees?

Input Format

  • The first line of input will contain a single integer T, denoting the number of test cases.
Solution Click Below:-  👉CLICK HERE👈
👇👇👇👇👇


  • Each test case consists of a single line of input containing a single integer X.

Output Format



For each test case, output on a new line the minimum number of coins Chef needs to pay exactly X rupees.

Constraints

  • 1T1000

No comments:

Post a Comment