From 460a43167c97f9bab421bc1639071a83b54b1a51 Mon Sep 17 00:00:00 2001 From: suyeun84 <81475092+suyeun84@users.noreply.github.com> Date: Sat, 30 Aug 2025 23:12:58 +0900 Subject: [PATCH] =?UTF-8?q?[20250830]=20PGM=20/=20LV3=20/=20=EC=9E=85?= =?UTF-8?q?=EA=B5=AD=EC=8B=AC=EC=82=AC=20/=20=EA=B9=80=EC=88=98=EC=97=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...05\352\265\255\354\213\254\354\202\254.md" | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 "suyeun84/202508/30 PGM LV3 \354\236\205\352\265\255\354\213\254\354\202\254.md" diff --git "a/suyeun84/202508/30 PGM LV3 \354\236\205\352\265\255\354\213\254\354\202\254.md" "b/suyeun84/202508/30 PGM LV3 \354\236\205\352\265\255\354\213\254\354\202\254.md" new file mode 100644 index 00000000..c7b0e6cd --- /dev/null +++ "b/suyeun84/202508/30 PGM LV3 \354\236\205\352\265\255\354\213\254\354\202\254.md" @@ -0,0 +1,23 @@ +```java +import java.util.*; +class Solution { + public long solution(int n, int[] times) { + Arrays.sort(times); + long start = 0; + long end = (long)times[times.length-1]*(long)n; + while (start <= end) { + long mid = (start + end) / 2; + long total = 0; + for (int i = 0; i < times.length; i++) { + total += mid / times[i]; + } + if (total < n) { + start = mid + 1; + } else { + end = mid - 1; + } + } + return start; + } +} +```