티스토리 뷰
# 10953 A+B
while True:
input_data = list(map(int,input().split(' ')))
if input_data[0] == 0 and input_data[1] == 0:
break
else:
print(input_data[0] + input_data[1])
# 10951 A+B
import sys
while True :
try :
a, b = map(int, input().split())
print(a+b)
except :
break
# 1110 더하기 사이클
import math
N = int(input())
n = str(N)[:]
cn = 0
while True:
a = math.floor(N/10)
b = N%10
c = (a+b) % 10
N = int(str(b) + str(c))
cn += 1
if N == int(n):
print(cn)
break
else :
continue
문제 출처
'프로그래밍 > BOJ' 카테고리의 다른 글
백준: #단계별로 풀어보기, 함수 (0) | 2020.01.11 |
---|---|
백준: #단계별로 풀어보기, 1차원 배열 (2) (0) | 2020.01.10 |
백준: #단계별로 풀어보기, 1차원 배열 (1) (0) | 2020.01.10 |
# 단계별로 풀어보기 :if (0) | 2020.01.05 |
# 단계별로 풀어보기 :for (0) | 2020.01.05 |
댓글