백준 10952 파이썬

2024. 1. 23. 13:13코딩/백준 (단계별)

반응형

백준 10952 : A+B - 5

문제

https://www.acmicpc.net/problem/10952

 

10952번: A+B - 5

두 정수 A와 B를 입력받은 다음, A+B를 출력하는 프로그램을 작성하시오.

www.acmicpc.net

 

10952

 

답안 코드 :

while 1:
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        break
    else:
        print(a + b)

 

백준 / 문제 / 단계별로 풀어보기 / 3단계 반복문

while 1:
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        break
    else:
        print(a + b)
반응형

'코딩 > 백준 (단계별)' 카테고리의 다른 글

백준 10807 파이썬 , count : python 리스트 내장 메소드  (2) 2024.01.24
백준 10951 파이썬  (1) 2024.01.24
백준 2439 파이썬  (3) 2024.01.23
백준 2438 파이썬  (5) 2024.01.22
백준 11022 파이썬  (2) 2024.01.22