ATM Solved Problem code: HS08TES, solvedhs08tes
1 # ATM2 import sys3 4 withdraw, balance = map (float, sys. stdin. readline (). strip (). split () # strip () is used to remove the ending \ n symbol 5 6 if int (withdraw) % 5! = 0 or balance <(withdraw + 0.5): #1. Pay attention to the service fee. if the service fee is missing, you cannot obtain 2. xy0 ~ 2000 is the test value requirement. You do not need to determine 7 print ("%. 2f" % balance) 8 else: 9 print ("%. 2f" % (balance-withdraw-0.5 ))
Learning
Data
Type requirements
Map to float
Intensive Reading output
"%. 2f"
Read
Introduction of sys standard library, stdlib/io
Use split () to read two
Make mistakes
Remove \ n tail symbols
Py indent note
0.5 handling fee
Chinese character mixing mistakes
Many of the test data types contained in the system do not need to be further judged.