from operator import mul
from fractions import Fraction
from functools import reduce


def numCombs(n, k):
    """
    n choose k algorithm
    """
    return int( reduce(mul, (Fraction(n-i, i+1) for i in range(k)), 1) )