[Solution] Tax in Chefland CodeChef Solution
Problem
In Chefland, a tax of rupees is deducted if the total income is strictly greater than rupees .
Given that total income is rupees, find out how much money you get.
Input Format
- The first line of input will contain a single integer , denoting the number of test cases.
- The first and only line of each test case contains a single integer — your total income.
Output Format
For each test case, output on a new line, the amount of money you get.
Explanation:
Test case : Your total income is rupees which is less than rupees. Thus, no tax would be deducted and you get rupees.
Test case : Your total income is rupees which is greater than rupees. Thus, a tax of rupees would be deducted and you get rupees.
Test case : Your total income is rupees which is greater than rupees. Thus, a tax of rupees would be deducted and you get rupees.
Test case : Your total income is rupees which is equal to rupees. Thus, no tax would be deducted and you get rupees.
No comments:
Post a Comment