반응형
https://www.acmicpc.net/problem/1110
# @Author YoungMinKim
# baekjoon
def one_to_two(num):
if int(num)<10:
return '0'+num
else:return num
x= str(input())
cnt=0
n=one_to_two(x)
while True:
hap = int(n[0])+int(n[1])
hap=str(hap)
cnt+=1
hap = one_to_two(hap)
if int(n[1]+hap[1]) == int(x):
break
else:
n=n[1]+hap[1]
print(cnt)
반응형
'백준 문제풀이' 카테고리의 다른 글
baekjoon - python - 1157 (0) | 2020.08.21 |
---|---|
baekjoon - python - 1152 (0) | 2020.08.21 |
baekjoon - python - 1026 (0) | 2020.08.21 |
baekjoon - python - 1008 (0) | 2020.08.21 |
baekjoon - python - 1001 (0) | 2020.08.21 |
댓글