We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6ae806d commit 6e3651fCopy full SHA for 6e3651f
suyeun84/202508/30 PGM LV3 입국심사.md
@@ -0,0 +1,23 @@
1
+```java
2
+import java.util.*;
3
+class Solution {
4
+ public long solution(int n, int[] times) {
5
+ Arrays.sort(times);
6
+ long start = 0;
7
+ long end = (long)times[times.length-1]*(long)n;
8
+ while (start <= end) {
9
+ long mid = (start + end) / 2;
10
+ long total = 0;
11
+ for (int i = 0; i < times.length; i++) {
12
+ total += mid / times[i];
13
+ }
14
+ if (total < n) {
15
+ start = mid + 1;
16
+ } else {
17
+ end = mid - 1;
18
19
20
+ return start;
21
22
+}
23
+```
0 commit comments