Description
China 's personal income tax adopts the "excess progressive tax rate" calculation method. The simplified formula is as follows:
tax payment = (personal salary deduction insurance income - personal tax exemption) * tax rate
Among them , the personal tax exemption is 3,500 yuan, and the tax rate is based on the applicable tax rate. The amount of tax varies, as shown in the table below:
Note: "Tax payable" is: Personal Salary Deduction Income – Personal Tax Exemption
Please write a program to calculate personal income tax based on user input, which is personal salary deduction income .
It is agreed that the user input is an integer in RMB.
Test Case:
Input:
1500
Output:
0
Parse:
m0=int(input())
ans=0
if m0>3500:
m1=m0-3500
if m1<1500:
ans=0.03*m1
elif m1<4500:
ans=0.1*m1
elif m1<9000:
ans=0.2*m1
elif m1<35000:
ans=0.25*m1
elif m1<55000:
ans=0.3*m1
elif m1<80000:
ans=0.35*m1
else:
ans=0.45*m1
else:
ans=0
print(ans)