We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6b02c37 commit d11714eCopy full SHA for d11714e
learntosurf/Binary Search/2025-01-18-[BOJ]-#2343.기타레슨.py
@@ -20,11 +20,12 @@
20
count += 1 # 블루레이 개수 증가
21
total = 0 # 블루레이에 담은 강의 길이 초기화
22
total += t # 블루레이에 강의 추가
23
-
24
- if count <= M:
25
- answer = mid # 가능한 블루레이 크기 저장
26
- end = mid - 1
27
- else:
28
- start = mid + 1
+
+ # 블루레이 개수를 확인하고 이진탐색 범위 조정
+ if count <= M:
+ answer = mid # 가능한 블루레이 크기 저장
+ end = mid - 1
+ else:
29
+ start = mid + 1
30
31
print(answer)
0 commit comments