https://www.acmicpc.net/problem/10952
while True:
a , b = map(int,input().split())
if a == 0 and b == 0:
break
else:
print(a + b)
코드 해석
https://holywat2r.tistory.com/115
while True: # 해당 반복문을 계속 실행
a , b = map(int,input().split()) # a, b 값을 받아들임
if a == 0 and b == 0: # a, b가 둘다 0 일경우 while문 탈출
break
else: # 그렇지 않다면 a + b 실행
print(a + b)
'Python > BOJ' 카테고리의 다른 글
[Python] 백준 1110 더하기 사이클 (0) | 2021.08.21 |
---|---|
[Python] 백준 10951 A + B - 4 (0) | 2021.08.21 |
[Python] 백준 10871 : X보다 작은 수 (0) | 2021.08.21 |
[Python] 합 (0) | 2021.08.11 |
[Python] A + B - 3 (0) | 2021.08.11 |