We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 25ca0b0 + 8504ccc commit 69763e3Copy full SHA for 69763e3
zinnnn37/202511/17 PGM LV2 가장 큰 수.md
@@ -0,0 +1,29 @@
1
+```java
2
+import java.util.Arrays;
3
+
4
+public class PGM_LV2_가장_큰_수 {
5
6
+ private static int len;
7
+ private static String answer;
8
+ private static String[] nums;
9
10
+ public String solution(int[] numbers) {
11
+ answer = "";
12
+ len = numbers.length;
13
+ nums = new String[len];
14
15
+ for (int i = 0; i < len; i++) {
16
+ nums[i] = String.valueOf(numbers[i]);
17
+ }
18
+ Arrays.sort(nums, (a, b) -> (b + a).compareTo(a + b));
19
20
+ if (nums[0].equals("0")) return "0";
21
22
23
+ answer += nums[i];
24
25
+ return answer;
26
27
28
+}
29
+```
0 commit comments