백준 #1110

sese·2022년 1월 5일
0

python

n = int(input())
new = n
count = 0

while True:
    tmp = new // 10 + new % 10  # 2 + 6 = 8, 6 + 8 = 14
    new = int(str(new % 10) + str(tmp % 10))  # "6" + "8" = 68, "8" + "4" = 84
    count += 1
    if n == new:
        break

print(count)
profile
예전 글은 다크모드로 봐야 잘 보일 수도 있습니다.

0개의 댓글

관련 채용 정보