原题链接:PTA | 程序设计类实验辅助教学平台
Tips:以下Python代码仅个人理解,非最优算法,仅供参考!多学习其他大佬的AC代码!
n, m = map(int, input().split())
res = []
for i in range(n):
nums = list(map(int, input().split()))
res.append(max(nums))
print(*res)
print(max(res))
原题链接:PTA | 程序设计类实验辅助教学平台
Tips:以下Python代码仅个人理解,非最优算法,仅供参考!多学习其他大佬的AC代码!
n, m = map(int, input().split())
res = []
for i in range(n):
nums = list(map(int, input().split()))
res.append(max(nums))
print(*res)
print(max(res))