#这段代码输入以下值会报错,输入其他值都不报错,一直查不出为什么,请大神们帮忙看下,谢谢。# 5# Prashant# 52.22# Kush# 52.223# Kant# 52.222# Kanti# 52.2222# Harshit# 52.22222M = []for _ in range(int(raw_input())): name = raw_input() score = float(raw_input()) L = [] L.append(name) L.append(score) M.append(L)if len(M) < 2: print '2 names must be given at least.'if len(M) > 5: print 'The number of names can not exceed 5'N = []for x in M: for y in M: if x[1] > y[1] and x not in N: N.append(x)for sec in N: for bigger in N: if sec[1] < bigger[1]: N.remove(bigger) if sec[1] > bigger[1]: N.remove(sec)N.sort()for result in N: print result[0]
添加回答
举报
0/150
提交
取消