AcWing 669. 加薪 Python3
原题链接
简单
作者:
sE@_0tT3r
,
2021-03-19 09:58:58
,
所有人可见
,
阅读 353
Python3 代码
cs = eval(input())
rnge = [0, 400, 800, 1200, 2000]
percent = [15, 12, 10, 7, 4]
for i in range(0, 5):
if cs > 2000:
print("Novo salario:",f'{cs + (cs)*(1/25):.2f}')
print("Reajuste ganho:",f'{(cs)*(1/25):.2f}' )
print("Em percentual: 4 %")
break
if cs <=rnge[i+1] and cs > rnge[i]:
print("Novo salario:",f'{cs + (cs)*(percent[i]/100):.2f}')
print("Reajuste ganho:",f'{(cs)*(percent[i]/100):.2f}' )
print("Em percentual:",percent[i],"%")
break