Skip to content

Commit d11714e

Browse files
committed
[BOJ] #2343.기타 레슨 / 실버1 / 60(X)
1 parent 6b02c37 commit d11714e

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

learntosurf/Binary Search/2025-01-18-[BOJ]-#2343.기타레슨.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@
2020
count += 1 # 블루레이 개수 증가
2121
total = 0 # 블루레이에 담은 강의 길이 초기화
2222
total += t # 블루레이에 강의 추가
23-
24-
if count <= M:
25-
answer = mid # 가능한 블루레이 크기 저장
26-
end = mid - 1
27-
else:
28-
start = mid + 1
23+
24+
# 블루레이 개수를 확인하고 이진탐색 범위 조정
25+
if count <= M:
26+
answer = mid # 가능한 블루레이 크기 저장
27+
end = mid - 1
28+
else:
29+
start = mid + 1
2930

3031
print(answer)

0 commit comments

Comments
 (0)