题解 | #Mileage Bank#
Mileage Bank
https://www.nowcoder.com/practice/8ec03ec1fa7544cf84244a441ff9405c
def Mileage(a, b):
if b == 'F':
return 2*a
elif b == 'B':
return int(a + 0.5*a + 0.5)
elif b == 'Y' and a >= 500:
return a
else:
return 500
s1 = 0
while True:
s = list(input().split())
if s[0] == '0' or s[0] == '#':
break
s1+=Mileage(int(s[2]), s[-1])
print(s1)
SHEIN希音公司福利 337人发布