백준9095파이썬 썸네일형 리스트형 [Python][백준 9095번] 123 더하기 n = int(input()) m = 3 nums = [1, 2, 3] dp = [0]*11 dp[0] = 1 for i in range(len(dp)): for j in range(m): if i - nums[j] >= 0: dp[i] += dp[i-nums[j]] print("dp", dp) 더보기 [Python][백준 9095번] 123더하기 # https://www.acmicpc.net/problem/9095 import sys import heapq import math from collections import deque sys.stdin = open("input.txt", "rt") sys.setrecursionlimit(1001*1001) n = int(input()) m = 3 nums = [1, 2, 3] dp = [0]*11 dp[0] = 1 for i in range(len(dp)): for j in range(m): if i - nums[j] >= 0: dp[i] += dp[i-nums[j]] print("dp", dp) 더보기 이전 1 다음