GUPTA MECHANICAL

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

Wednesday 3 August 2022

[Solution] Discount Codechef Solution



Problem

Alice buys a toy with a selling price of 100 rupees. There is a discount of x percent on the toy. Find the amount Alice needs to pay for it.

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 — the discount on the toy.

Output Format

For each test case, output on a new line the price that Alice needs to pay.

Explanation:

Test case 1: The discount is 5 percent, i.e. 5 rupees. So, Alice will have to pay 100-5=95 rupees.

No comments:

Post a Comment