有python大佬,可以帮我看看有哪里不对,为什么是0分
查看原帖
有python大佬,可以帮我看看有哪里不对,为什么是0分
306116
jy2356286251楼主2020/7/5 16:13
t,m = map(int,input().split())
t1,m1 = map(int,input().split())
t2,m2 = map(int,input().split())
t3,m3 = map(int,input().split())
a = []
if t1+t2+t3 <= t:
    a.append(m1+m2+m3)
if t1+t2 <= t:
    a.append(m1+m2)
if t1+t3 <= t:
    a.append(m1+m3)
if t2 +t3 <= t:
    a.append(m2+m3)
if t1 <= t:
    a.append(m1)
if t2 <= t:
    a.append(m2)
if t3 <= t:
    a.append(m3)
print(max(a))
2020/7/5 16:13
加载中...