From 553052553f2fcdce4e8d84abaec1244216878ec0 Mon Sep 17 00:00:00 2001 From: YeIn kim <2076070@ewhain.net> Date: Tue, 6 May 2025 23:49:31 +0900 Subject: [PATCH] =?UTF-8?q?[Baekjoon-14501]=20=ED=83=80=EC=9E=84=EC=96=B4?= =?UTF-8?q?=ED=83=9D=5F=ED=87=B4=EC=82=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "BOJ/yein/13_week/\355\207\264\354\202\254.py" | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 "BOJ/yein/13_week/\355\207\264\354\202\254.py" diff --git "a/BOJ/yein/13_week/\355\207\264\354\202\254.py" "b/BOJ/yein/13_week/\355\207\264\354\202\254.py" new file mode 100644 index 0000000..68947a4 --- /dev/null +++ "b/BOJ/yein/13_week/\355\207\264\354\202\254.py" @@ -0,0 +1,15 @@ +# N: 퇴사까지 남은 날 +N = int(input()) + +# dp: idx번째까지 일했을 때의 최대 수익 +# 인덱스 주의 :: dp[0] != 1일차 +dp = [0 for _ in range(N+1)] + +for i in range(N): + # 상담시간 T와 상담비용 P + time, price = map(int, input().split()) + today = i+time + for j in range(today, N+1): + if(dp[j]