#1047 지능형 기차Ⅰ : 오일러OJ (euleroj.io)
max_people=0
cnt=0
people=[]
for i in range(0,8,2):
x,y=map(int,input().split())
people.append(x)
people.append(y)
for i in range(0,8,2):
cnt=cnt-people[i]
cnt=cnt+people[i+1]
if cnt>max_people:
max_people=cnt
print(max_people)
'코딩 및 기타' 카테고리의 다른 글
| 오일러 3167(시간초과 아직 해결x (0) | 2022.12.31 |
|---|---|
| 오일러 1100,1131,1132 (0) | 2022.12.30 |
| 오일러 1045,1046,2022 (0) | 2022.12.28 |
| 오일러1044 (0) | 2022.12.27 |
| 오일러 1041,1042,1043 (0) | 2022.12.26 |