笔记整理自B站UPWLB工作生活两不误的个人空间-WLB工作生活两不误个人主页-哔哩哔哩视频教程Python 程序设计题13_哔哩哔哩_bilibili
程序设计题13
Python代码
money = int(input())
tax = 0
if money <= 60000:
print(money)
else:
# > 60000
yue = money - 60000
if yue <= 36000: # 1
tax = yue * 0.03
elif yue <= 144000: # 2
tax = 36000 * 0.03 + (yue - 36000) * 0.1
elif yue <= 300000: # 3
tax = 36000 * 0.03 + (144000 - 36000) * 0.1 + (yue - 144000) * 0.2
else: # 4
tax = 36000 * 0.03 + (144000 - 36000) * 0.1 + (300000 - 144000) * 0.2 + (yue - 300000) * 0.25
print(int(money - tax))
输入样例
70000
输出样例
69700