westblot @ 2024-12-01 08:41:54
n=int(input().strip())
lit=[a,0,0,0]
for i in range(n):
d=list(map(str,input().strip().split()))
l=int(d[1])+int(d[2])+int(d[3])
if l>(int(lit[1])+int(lit[2])+int(lit[3])):
lit=d
print(*lit)
by xhq_5206 @ 2024-12-01 08:52:42
你放到shell里先试一下再交啊
我这试了你的代码,已经报错了
by xhq_5206 @ 2024-12-01 08:57:54
还有,列表直接这样lit=d
赋值会出现地址是相同的
by xhq_5206 @ 2024-12-01 09:01:36
@westblot
by xhq_5206 @ 2024-12-01 09:06:05
@xhq_5206
如果你不明白这是什么意思,我给你放张图
by westblot @ 2024-12-01 11:46:35
@xhq_5206 谢谢哥,犯了个不该犯的错误,现在过了。。。
by xhq_5206 @ 2024-12-01 11:52:28
^_^