def C(n, k):
    """
    C(n, k) = n! / (n - k)! k!
    """
    c = 1

    if (k > n - k):
        k = n - k
    for a in range(0, k):
        c = c * (n - a)
        c = c // (a + 1)
    
    return c