🔗링크 : https://www.acmicpc.net/problem/12865🗒️파이썬 코드 풀이N = int(input())INF = sys.maxsizedp = [INF]*(N*4)dp[0],dp[1] = 0,0for i in range(1,N+1): dp[i*3] = min(dp[i]+1, dp[i*3]) dp[i*2] = min(dp[i]+1, dp[i*2]) dp[i+1] = min(dp[i]+1, dp[i+1])dp = dp[:N+1]cur = Nlst = [N]for k in range(N,0,-1): if dp[k] == dp[cur]-1 and (k*3==cur or (k+1)==cur or (k*2)==cur) : lst.append(k) ..