Closed smichr closed 3 years ago
def min_max(q, n): """ Find the smallest possible maximum value for the first part in a partition of q having n parts """ test_qnk(q, n) min_int, r = divmod(q, n) return min_int + 1 if r else min_int
Done. Thanks @smichr.