[백준10952_파이썬(python)] - A+B - 5

경이·2021년 6월 23일
0

🔴 문제

A+B - 5


🟡 Sol

import sys
while 1:
    A, B = map(int, sys.stdin.readline().split())
    if (A == 0 and B == 0):
        break
    print(A+B)

🟢 풀이

while문을 쓴 뒤 조건에 맞게 break를 걸고 빠져나온다.
그것도 모르고 True로 설정해서 틀림


🔵 Ref

https://wook-2124.tistory.com/234

profile
이사중입니다!🌟https://velog.io/@devkyoung2

0개의 댓글

관련 채용 정보