分巧克力
二分:
N, K = map(int, input().split())
w, h = [], []
for i in range(N):cur_w, cur_h = map(int, input().split())w.append(cur_w)h.append(cur_h)# 判断是否能分成K个及以上的巧克力
def check(a) -> bool: num = 0for i in range(N):num += (w[i] // a) * (h[i] // a)if num >= K:return Truereturn False#二分
l, r = 1, 10 ** 5
while l <= r:mid = (l + r) // 2if check(mid):l = mid + 1else:r = mid - 1
print(r)