Programming/백준

[백준] 1110 - 더하기 사이클 (파이썬)

pental 2020. 4. 2. 10:33

num = int(input())
check = num
new_num = 0
temp = 0
count = 0
while True:
    temp = num//10 + num%10
    new_num = (num%10)*10 + temp%10
    count += 1
    num = new_num
    if new_num == check:
        break
print(count)