Beakjoon&프로그래머스/파이썬
[백준/파이썬] 28417번 스케이트보드
현장
2023. 12. 30. 15:36
-Code
from sys import stdin
input = stdin.readline
n = int(input())
res = 0
for _ in range(n):
points = list(map(int, input().split()))
two_track = points[:2]
five_track = sorted(points[2:])
final_point = max(two_track) + sum(five_track[-2:])
res = max(res, final_point)
print(res)