새소식

Algorithm/Acmicpc.net (백준)

[python] 백준 : 지능형 기차 2 (2455번)

  • -
sum = 0
max = 0
for i in range(10):
    off, on = map(int, input().split())
    sum += on
    sum -= off
    if max < sum:
        max = sum
print(max)
Contents

포스팅 주소를 복사했습니다

이 글이 도움이 되었다면 공감 부탁드립니다.