From 8504cccc888917a0b9ebdf2a3ecb88913a5bd360 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=A7=84?= Date: Mon, 17 Nov 2025 20:36:16 +0900 Subject: [PATCH] =?UTF-8?q?[20251117]=20PGM=20/=20LV2=20/=20=EA=B0=80?= =?UTF-8?q?=EC=9E=A5=20=ED=81=B0=20=EC=88=98=20/=20=EA=B9=80=EB=AF=BC?= =?UTF-8?q?=EC=A7=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...\354\236\245 \355\201\260 \354\210\230.md" | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 "zinnnn37/202511/17 PGM LV2 \352\260\200\354\236\245 \355\201\260 \354\210\230.md" diff --git "a/zinnnn37/202511/17 PGM LV2 \352\260\200\354\236\245 \355\201\260 \354\210\230.md" "b/zinnnn37/202511/17 PGM LV2 \352\260\200\354\236\245 \355\201\260 \354\210\230.md" new file mode 100644 index 00000000..7655aa51 --- /dev/null +++ "b/zinnnn37/202511/17 PGM LV2 \352\260\200\354\236\245 \355\201\260 \354\210\230.md" @@ -0,0 +1,29 @@ +```java +import java.util.Arrays; + +public class PGM_LV2_가장_큰_수 { + + private static int len; + private static String answer; + private static String[] nums; + + public String solution(int[] numbers) { + answer = ""; + len = numbers.length; + nums = new String[len]; + + for (int i = 0; i < len; i++) { + nums[i] = String.valueOf(numbers[i]); + } + Arrays.sort(nums, (a, b) -> (b + a).compareTo(a + b)); + + if (nums[0].equals("0")) return "0"; + + for (int i = 0; i < len; i++) { + answer += nums[i]; + } + return answer; + } + +} +``` \ No newline at end of file