공부/데이터사이언스
[백준] 3단계 - 1095번 (파이썬) check!
PYo
2022. 6. 20. 16:24
반응형
1095번
https://www.acmicpc.net/problem/10951
# 1번째 풀이
while True:
try:
A,B = list(map(int, input().split()))
print(A+B)
except:
break
# 2번째 풀이
try:
while True:
A,B = list(map(int, input().split()))
print(A+B)
except:
exit()
어려웠다...나중에 다시 풀어보자!
(사실 입력부분에 대한 문제 이해가 어려웠던 거고 코드 자체는 어렵진 않음...)
cf) 2번째 풀이 참고한 사이트
https://wook-2124.tistory.com/247
반응형