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.

Difficulty: interview

Starter code:

Solutions:
arr = [0]*6

arr[1] = 250000*(0.05)
arr[2] = 250000*(0.10)
arr[3] = 250000*(0.15)
arr[4] = 250000*(0.20)
arr[5] = 250000*(0.25)

for _ in range(int(input())):
 n = int(input())

 tax = 0

 if n<=250000:
  tax = 0

 elif 250000<n<=500000:
  tax = sum(arr[:1])

  rem = n - 250000

  tax+= (rem)*(0.05)

 elif 500000<n<=750000:
  tax = sum(arr[:2])

  rem = n - 500000

  tax+= (rem)*(0.10)

 elif 750000<n<=1000000:
  tax = sum(arr[:3])

  rem = n - 750000

  tax+= (rem)*(0.15)

 elif 1000000<n<=1250000:
  tax = sum(arr[:4])

  rem = n - 1000000

  tax+= (rem)*(0.20)
 
 elif 1250000<n<=1500000:
  tax = sum(arr[:5])

  rem = n - 1250000

  tax+= (rem)*(0.25)
 
 elif n>1500000:
  tax = sum(arr[:6])

  rem = n - 1500000

  tax+= (rem)*(0.30)
 
 res = int(n - tax)
 
 print(res)



 


 



# cook your dish here
try:
 for _ in range(int(input())):
  x=int(input())
  if x<=250000:
   print(x)
  elif x<=500000:
   res=x-((x-250000)*(0.05))
   print(int(res))
  elif x<=750000:
   res=x-(12500+(x-500000)*(0.1))
   print(int(res))
  elif x<=1000000:
   res=x-(12500+25000+(x-750000)*(0.15))
   print(int(res))
  elif x<=1250000:
   res=x-(12500+25000+37500+(x-1000000)*(0.2))
   print(int(res))
  elif x<=1500000:
   res=x-(12500+25000+37500+50000+(x-1250000)*(0.25))
   print(int(res))
  else:
   res=x-(12500+25000+37500+50000+62500+(x-1500000)*(0.3))
   print(int(res))
except:
 pass

try:
 # cook your code here
 for _ in range(int(input())):
  a=int(input())
  if a<=250000:
   print(a)
  elif a<=500000:
   res=a-((a-250000)*(0.05))
   print(int(res))
  elif a<=750000:
   res=a-(12500+(a-500000)*(0.1))
   print(int(res))
  elif a<=1000000:
   res=a-(12500+25000+(a-750000)*(0.15))
   print(int(res))
  elif a<=1250000:
   res=a-(12500+25000+37500+(a-1000000)*(0.2))
   print(int(res))
  elif a<=1500000:
   res=a-(12500+25000+37500+50000+(a-1250000)*(0.25))
   print(int(res))
  else:
   res=a-(12500+25000+37500+50000+62500+(a-1500000)*(0.3))
   print(int(res))
except:
 pass

def solve(n):
 total=n
 tax=0
 if n>1500000:
  tax+=(n-1500000)*(0.30)
  n=1500000
 if n>1250000:
  tax+=(n-1250000)*(0.25)
  n=1250000
 if n>1000000:
  tax+=(n-1000000)*(0.20)
  n=1000000
 if n>750000:
  tax+=(n-750000)*(0.15)
  n=750000
 if n>500000:
  tax+=(n-500000)*(0.10)
  n=500000
 if n>250000:
  tax+=(n-250000)*(0.05)
 return int(total-tax)
for _ in range(int(input())):
 n=int(input())
 print(solve(n))

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))

N=int(input())
while(N):
 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))
 N=N-1

for _ in range(int(input())):
 n = int(input())
 x = n//250000
 c = x*250000
 r = n-c
 tax = 0
 if n<=1500000:
  i = 0
  while c>0:
   tax += i*12500
   c-=250000
   i+=1
  t1 = x*0.05*r
  tax+=t1
 else:
  i = 0
  d = n-1500000
  k = 1500000
  while k>0:
   tax += i*12500
   k-=250000
   i+=1
  t1 = d*0.3
  tax+=t1
 print(int(n-tax))
  
 
  


# cook your dish here
# cook your dish here
N=int(input())
while(N):
 income=int(input())
 tax=0
 if income<=250000: 
   tax=0
 if income>250000 and income<=500000:
  tax+=(income-250000)*0.05
 elif income>500000:
   tax+=12500
 if income>500000 and income<=750000:
  tax+=(income-500000)*0.10
 elif income>750000:
   tax+=25000
 if income>750000 and income<=1000000:
  tax+=(income-750000)*0.15
 elif income>1000000:
  tax+=37500
 if income>1000000 and income<=1250000:
  tax+=(income-1000000)*0.2
 elif income>1250000:
  tax+=50000
 if income>1250000 and income<=1500000:
  tax+=(income-1250000)*0.25
 elif income>1500000:
  tax+=62500
 if income>1500000:
  tax+=(income-1500000)*0.30
 print(int(income-tax))
 N-=1
   


# cook your dish here
N=int(input())
while(N):
 income=int(input())
 tax=0
 if income<=250000: 
   tax=0
 if income>250000 and income<=500000:
  tax+=(income-250000)*0.05
 elif income>500000:
   tax+=12500
 if income>500000 and income<=750000:
  tax+=(income-500000)*0.10
 elif income>750000:
   tax+=25000
 if income>750000 and income<=1000000:
  tax+=(income-750000)*0.15
 elif income>1000000:
  tax+=37500
 if income>1000000 and income<=1250000:
  tax+=(income-1000000)*0.2
 elif income>1250000:
  tax+=50000
 if income>1250000 and income<=1500000:
  tax+=(income-1250000)*0.25
 elif income>1500000:
  tax+=62500
 if income>1500000:
  tax+=(income-1500000)*0.30
 print(int(income-tax))
 N-=1
   


# cook your dish here
for i in range(int(input())):
 x=int(input())
 l=[250000,500000,750000,1000000,1250000,1500000]
 l1=[0.05,0.10,0.15,0.20,0.25,0.30]
 count=0
 if x<=l[0]:
  print(x)
 else:
  for i in range(1,len(l)):
   if x<=l[i]:
    p=x-l[i-1]
    count=count+(p*l1[i-1])
    break
   else:
    p=l[i]-l[i-1]
    count=(l1[i-1]*p)+count
  else:
   p=x-l[len(l)-1]
   count=p*l1[len(l1)-1]+count
  print(int(x-count))
  


for _ in range(int(input())):
 n = int(input())
 # h,p = map(int,input().split())
 net = 0
 tax = 0
 if n<=250000 :
  print(int(n))
 elif n<=500000 :
  tax = (n-250000)*0.05
  print(int(n-tax))
 elif n<=750000 :
  tax = 12500 + (n-500000)*0.10
  print(int(n-tax))
 elif n<=1000000 :
  tax = 12500 + 25000 + (n-750000)*0.15
  print(int(n-tax))
 elif n<=1250000 :
  tax = 12500 + 25000 + 37500 + (n-1000000)*0.20
  print(int(n-tax))
 elif n<=1500000 :
  tax = 12500 + 25000 + 37500 + 50000 + (n-1250000)*0.25
  print(int(n-tax))
 else :
  tax = 12500 + 25000 + 37500 + 50000 + 62500 + (n-1500000)*0.30
  print(int(n-tax))


t = int(input())

for _ in range(t):
 n = int(input())
 
 ans = 0
 
 if(n > 250000):
  if(n <= 500000):
   ans += (n-250000)*5//100
  else:
   ans += (500000-250000)*5//100
   
 if(n > 500000):
  if(n <= 750000):
   ans += (n-500000)*10//100
  else:
   ans += (750000-500000)*10//100
   
 if(n > 750000):
  if(n <= 1000000):
   ans += (n-750000)*15//100
  else:
   ans += (1000000-750000)*15//100
   
 if(n > 1000000):
  if(n <= 1250000):
   ans += (n-1000000)*20//100
  else:
   ans += (1250000-1000000)*20//100
   
 if(n > 1250000):
  if(n <= 1500000):
   ans += (n-1250000)*25//100
  else:
   ans += (1500000-1250000)*25//100
   
 if(n > 1500000):
  ans += (n-1500000)*30//100
 
 print(n-ans)

for _ in range(int(input())) :
 n = int(input())
 tax = 0
 if n <= 250_000 :
  tax = (n / 100) * 0 - 0
 elif n <= 500_000 :
  tax = ((n - 250_000) / 100) * 5 - 0
 elif n <= 750_000 :
  tax = ((n - 500_000) / 100) * 10 + 12500
 elif n <= 1_000_000 :
  tax = ((n - 750_000) / 100) * 15 + 37500
 elif n <= 1_250_000 :
  tax = ((n - 1_000_000) / 100) * 20 + 75000
 elif n <= 1_500_000 :
  tax = ((n - 1_250_000) / 100) * 25 + 125000
 elif n > 1_500_000 :
  tax = ((n - 1_500_000) / 100) * 30 + 187500
 print(int(n - tax))

# cook your dish here

 
t=int(input())

for i in range(t):
 ic=int(input())
 
 
 if ic<=250000:
  t1=0
 elif ic>250000 and ic<=500000:
  t1=(ic-250000)*0.05
 elif ic>500000 and ic<=750000:
  t1=(250000)*0.05+(ic-500000)*0.1 
 elif ic>750000 and ic<=1000000:
  t1=250000*0.05+250000*0.1+(ic-750000)*0.15
 elif ic>1000000 and ic<=1250000:
  t1=250000*(0.05+0.1+0.15)+(ic-1000000)*0.2
 elif ic>1250000 and ic<=1500000:
  t1=250000*(0.05+0.1+0.15+0.2)+(ic-1250000)*0.25
 else:
  t1=250000*(0.05+0.1+0.15+0.2+0.25)+(ic-1500000)*0.3
 print(int(ic-t1))
    


# cook your dish here
def tax(n):
 if(n <= 250000):
  return 0
 elif(n <= 500000):
  return (n-250000)*5//100
 elif(n <= 750000):
  return 2500*5+(n-500000)*10//100
 elif(n <= 1000000):
  return 2500*(5+10)+(n-750000)*15//100
 elif(n <= 1250000):
  return 2500*(5+10+15)+(n-1000000)*20//100
 elif(n <= 1500000):
  return 2500*(5+10+15+20)+(n-1250000)*25//100
 else:
  return 2500*(5+10+15+20+25)+(n-1500000)*30//100

for T in range(int(input())):
 income=int(input())
 total_tax=tax(income)
 print(income-total_tax)

# cook your dish here
for _ in range(int(input())):
 n = int(input())
 if n<=250000:
  print(n)
 elif 250000<n<=500000:
  print(int(n-((n-250000)*0.05)))
 elif 500000<n<=750000:
  print(int(n-(((n-500000)*0.1)+12500)))
 elif 750000<n<=1000000:
  print(int(n-(((n-750000)*0.15)+12500+25000)))
 elif 1000000<n<=1250000:
  print(int(n-(((n-1000000)*0.2)+12500+25000+37500)))
 elif 1250000<n<=1500000:
  print(int(n-(((n-1250000)*0.25)+12500+25000+37500+50000)))
 else:
  print(int(n-(((n-1500000)*0.3)+12500+25000+37500+50000+62500)))