GUPTA MECHANICAL

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

Wednesday 12 October 2022

[Solution] Tax in Chefland CodeChef Solution



Problem

In Chefland, a tax of rupees 10 is deducted if the total income is strictly greater than rupees 100.

Given that total income is X rupees, find out how much money you get.

Input Format

  • The first line of input will contain a single integer T, denoting the number of test cases.
  • The first and only line of each test case contains a single integer X — your total income.

Output Format

For each test case, output on a new line, the amount of money you get.

Explanation:

Test case 1: Your total income is 5 rupees which is less than 100 rupees. Thus, no tax would be deducted and you get 5 rupees.


Solution Click Below:-  👉CLICK HERE👈
👇👇👇👇👇

Test case 2: Your total income is 105 rupees which is greater than 100 rupees. Thus, a tax of 10 rupees would be deducted and you get 105-10 = 95 rupees.

Test case 3: Your total income is 101 rupees which is greater than 100 rupees. Thus, a tax of 10 rupees would be deducted and you get 101-10 = 91 rupees.

Test case 4: Your total income is 100 rupees which is equal to 100 rupees. Thus, no tax would be deducted and you get 100 rupees.

No comments:

Post a Comment