In India, every individual is charged with income tax on the total income each year. This tax is applied to specific ranges of income, which are called income tax slabs. The slabs of income tax keep changing from year to year. This fiscal year (2020-21), the tax slabs and their respective tax rates are as follows:Total income (in rupees)Tax rateup to Rs. 250,0000%from Rs. 250,001 to Rs. 500,0005%from Rs. 500,001 to Rs. 750,00010%from Rs. 750,001 to Rs. 1,000,00015%from Rs. 1,000,001 to Rs. 1,250,00020%from Rs. 1,250,001 to Rs. 1,500,00025%above Rs. 1,500,00030%
See the sample explanation for details on how the income tax is calculated.
You are given Chef's total income: $N$ rupees (Rs.). Find his net income. The net income is calculated by subtracting the total tax (also called tax reduction) from the total income. Note that you do not need to worry about any other kind of tax reductions, only the one described above.
-----Input-----
- The first line of the input contains a single integer $T$ denoting the number of test cases. The description of $T$ test cases follows.
- The first and only line of each test case contains a single integer $N$.
-----Output-----
For each test case, print a single line containing one integer — Chef's net income.
-----Constraints-----
- $1 \le T \le 10^3$
- $0 \le N \le 10^7$
- $N$ is a multiple of $100$
-----Example Input-----
2
600000
250000
-----Example Output-----
577500
250000
-----Explanation-----
Example case 1: We know that the total income is Rs. $6$ lakh ($1$ lakh rupees = $10^5$ rupees). The total tax for each slab is calculated as follows:
- Up to $2.5$ lakh, the tax is Rs. $0$, since the tax rate is $0$ percent.
- From above Rs. $2.5$ lakh to Rs. $5$ lakh, the tax rate is $5$ percent. Therefore, this tax is $0.05 \cdot (500,000-250,000)$, which is Rs. $12,500$.
- From above Rs. $5$ lakh to Rs. $6$ lakh, the tax rate is $10$ percent. Therefore, this tax is $0.10 \cdot (600,000-500,000)$, which is Rs. $10,000$.
- Summing them up, we get that the total tax on Chef's whole income is Rs. $22,500$. Since the net income is the total income minus the tax reduction, it is Rs. $600,000$ minus Rs. $22,500$, which is Rs. $577,500$.
Example case 2: For income up to Rs. $2.5$ lakh, we have no tax, so the net income is the same as the total income: Rs. $2.5$ lakh.
for _ in range(int(input())):
 n=int(input())
 tax=0
 if n<=250000:
  tax = n*0
 elif n>250000 and n<=500000:
  tax = (n-250000)*0.05
 elif n>500000 and n<=750000:
  tax = ((n-500000)*0.10)+12500
 elif n>750000 and n<=1000000:
  tax = ((n-750000)*0.15)+37500
 elif n>1000000 and n<=1250000:
  tax = ((n-1000000)*0.20)+75000
 elif n>1250000 and n<=1500000:
  tax = ((n-1250000)*0.25)+125000
 elif n>1500000:
  tax = ((n-1500000)*0.30)+187500
 print(int(n-tax))
for _ in range(int(input())):
 n=int(input())
 tax=0
 if n<=250000:
  tax = n*0
 elif n>250000 and n<=500000:
  tax = (n-250000)*0.05
 elif n>500000 and n<=750000:
  tax = ((n-500000)*0.10)+12500
 elif n>750000 and n<=1000000:
  tax = ((n-750000)*0.15)+37500
 elif n>1000000 and n<=1250000:
  tax = ((n-1000000)*0.20)+75000
 elif n>1250000 and n<=1500000:
  tax = ((n-1250000)*0.25)+125000
 elif n>1500000:
  tax = ((n-1500000)*0.30)+187500
 print(int(n-tax))