def comb(N, k):
    """Return number of combinations of k objects from a set of N objects
    without repetitions, a.k.a. the binomial coefficient of N and k."""
    ret = 1
    for mlt in range(N, N - k, -1):
        ret *= mlt
    for dv in range(1, k + 1):
        ret //= dv
    return ret
