https://www.acmicpc.net/problem/10951
while True:
try:
a, b = map(int, input().split())
except:
break
print(a + b)
코드 해석
https://holywat2r.tistory.com/117
try- except의 예외처리를 이용한 문제이다.
'Python > BOJ' 카테고리의 다른 글
[Python] 백준 10818 최소, 최대 (0) | 2021.08.22 |
---|---|
[Python] 백준 1110 더하기 사이클 (0) | 2021.08.21 |
[Python] 백준 10952 A + B - 5 (0) | 2021.08.21 |
[Python] 백준 10871 : X보다 작은 수 (0) | 2021.08.21 |
[Python] 합 (0) | 2021.08.11 |