From e449bfe9753fb164a939c72ffe669c75d9b1fbe0 Mon Sep 17 00:00:00 2001 From: LiiNi-coder <97495437+LiiNi-coder@users.noreply.github.com> Date: Mon, 10 Nov 2025 23:03:47 +0900 Subject: [PATCH] =?UTF-8?q?[20251110]=20PGM=20/=20LV2=20/=20=EA=B0=80?= =?UTF-8?q?=EC=9E=A5=20=ED=81=B0=20=EC=88=98=20/=20=EC=9D=B4=EC=9D=B8?= =?UTF-8?q?=ED=9D=AC?= 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" | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 "LiiNi-coder/202511/10 PGM \352\260\200\354\236\245 \355\201\260 \354\210\230.md" diff --git "a/LiiNi-coder/202511/10 PGM \352\260\200\354\236\245 \355\201\260 \354\210\230.md" "b/LiiNi-coder/202511/10 PGM \352\260\200\354\236\245 \355\201\260 \354\210\230.md" new file mode 100644 index 00000000..aa10b76a --- /dev/null +++ "b/LiiNi-coder/202511/10 PGM \352\260\200\354\236\245 \355\201\260 \354\210\230.md" @@ -0,0 +1,33 @@ +```java +import java.util.*; + +class Solution { + public String solution(int[] numbers) { + String[] strs = new String[numbers.length]; + for(int i = 0; i < numbers.length; i++){ + strs[i] = String.valueOf(numbers[i]); + } + + Arrays.sort(strs, new Comparator() { + @Override + public int compare(String a, String b) { + String ab = a + b; + String ba = b + a; + return ba.compareTo(ab); + } + }); + + if(strs[0].equals("0")){ + return "0"; + } + + StringBuilder sb = new StringBuilder(); + for(String s : strs){ + sb.append(s); + } + + return sb.toString(); + } +} + +```