摘要: 给定当前账户总数,后面列表为要取出的钱,然后以以下规则取钱:1)ATM机的最小单位为5,所以,只能取 那些被5整除的钱;2)每次取钱收取佣金为0.5+1%3)每次操作后余额向下取整 1 # Withdraw without any incident 2 # 120 - 10 - 0.5 - 1% = floor(109.4) = 109 3 # 109 - 20 - 0.5 - 1% = floor(88.3) = 88 4 # 88 - 30 - 0.5 - 1% = floor(57.2) = 57 5 from math import floor 6 def checkio(data). 阅读全文
posted @ 2012-11-14 11:45 dandingyy 阅读(507) 评论(0) 推荐(0) 编辑