Adventure Time - Jake [백준/python] 10951번/ 입력개수 정해지지 않았을 때 -> while문 try-except ->에러 발생 시 입력 x
본문 바로가기
Back-end/백준(python)

[백준/python] 10951번/ 입력개수 정해지지 않았을 때 -> while문 try-except ->에러 발생 시 입력 x

by bogyoi 2023. 10. 24.
while (1):
    try:
        a, b = map(int, input().strip().split())
        print(a+b)
        
    except:
        break