From 6266febe5ff8cb736621023e05a59b1d5a06200d Mon Sep 17 00:00:00 2001 From: nkey Date: Wed, 14 Oct 2026 16:37:19 +0900 Subject: [PATCH] =?UTF-8?q?152=20=EC=84=B1=EA=B3=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- repetition/dp/152.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repetition/dp/152.py b/repetition/dp/152.py index 850dc20..0fb93a4 100644 --- a/repetition/dp/152.py +++ b/repetition/dp/152.py @@ -8,8 +8,8 @@ class Solution: for num in nums[1:]: temp_min = now_min - now_min = (num, now_max * num, now_min * num) - now_max = (num, now_max * num, temp_min * num) + now_min = min(num, now_max * num, now_min * num) + now_max = max(num, now_max * num, temp_min * num) answer = max(answer, now_max)