mid == 0이 되는 경우가 발생하면 런타임오류.
ex :
import sys
input = sys.stdin.readline
k, n = list(map(int, list(input().split())))
cables = [int(input()) for _ in range(k)]
cables.sort(reverse=True)
# 조건에 맞으면 True
def check(cutLine):
a = 0
for cab in cables:
a += cab // cutLine
if a >= n:
return True
return False
start = 1
end = cables[0]
ans = 0
while start <= end:
mid = (start + end) // 2
if check(mid):
ans = mid
start = mid + 1
else:
end = mid - 1
print(ans)