ATM Solved Problem code: HS08TES, solvedhs08tes

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.