def combination(n, r):
    '\n    :param n: the count of different items\n    :param r: the number of select\n    :return: combination\n    n! / (r! * (n - r)!)\n    '
    r = min((n - r), r)
    result = 1
    for i in range(n, (n - r), (- 1)):
        result *= i
    for i in range(1, (r + 1)):
        result //= i
    return result
:param n: the count of different items
:param r: the number of select
:return: combination
n! / (r! * (n - r)!)
def combination(n, r):
    '\n    :param n: the count of different items\n    :param r: the number of select\n    :return: combination\n    n! / (r! * (n - r)!)\n    '
    r = min((n - r), r)
    result = 1
    for i in range(n, (n - r), (- 1)):
        result *= i
    for i in range(1, (r + 1)):
        result //= i
    return result