GUPTA MECHANICAL

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

Wednesday 1 June 2022

[Solution] Chef and Chocolates CodeChef Solution | CodeChef Problem Solution 2022

Chef has X 5 rupee coins and Y 10 rupee coins. Chef goes to a shop to buy chocolates for Chefina where each chocolate costs Z rupees. Find the maximum number of chocolates that Chef can buy for Chefina.

Input Format

  • The first line contains a single integer T — the number of test cases. Then the test 
Solution Click Below:-  CLICK HERE

  • cases follow.
  • The first and only line of each test case contains three integers XY and Z — the number of 5 rupee coins, the number of 10 rupee coins and the cost of each chocolate.

Output Format

For each test case, output the maximum number of chocolates that Chef can buy for Chefina.

Constraints

  • 1T100

No comments:

Post a Comment