[Baekjoon 12852 / python / 실버1] 1로 만들기 2 import sys input = sys.stdin.readline x = int(input()) d = [0] * (x + 1) path = ['' for _ in range(x + 1)] path[1] = '1' for i in range(2, x + 1): d[i] = d[i - 1] + 1 prev = i - 1 if i % 3 == 0 and d[i // 3] + 1 Algorithm/Dynamic Programming 2024.04.05