





"""simple docstring"""



from __future__ import annotations







def 		__lowercase					(       snake_case_  :  list[list[int]]						)       ->bool:



    '''simple docstring'''







    __A   :						Dict									=					len(snake_case_						)
    # We need to create solution object to save path.
    __A   :						int									=					[[0 for _ in range(snake_case_						)] for _ in range(snake_case_						)]
    __A   :						str									=					run_maze(snake_case_    ,0    ,0    ,snake_case_						)
    if solved:
        print('''\n'''.join(str(snake_case_						) for row in solutions						)						)
    else:
        print('''No solution exists!'''						)
    return solved







def 		__lowercase					(       snake_case_  :  list[list[int]]    ,snake_case_  :  int    ,snake_case_  :  int    ,snake_case_  :  list[list[int]]						)       ->bool:



    '''simple docstring'''







    __A   :						str									=					len(snake_case_						)
    # Final check point.
    if i == j == (size - 1):
        __A   :						Optional[Any]									=					1
        return True

    __A   :						int									=					(not i < 0) and (not j < 0)  # Check lower bounds
    __A   :						List[str]									=					(i < size) and (j < size)  # Check upper bounds

    if lower_flag and upper_flag:
        # check for already visited and block points.
        __A   :						str									=					(not solutions[i][j]) and (not maze[i][j])
        if block_flag:
            # check visited
            __A   :						int									=					1

            # check for directions
            if (
                run_maze(snake_case_    ,i + 1    ,snake_case_    ,snake_case_						)
                or run_maze(snake_case_    ,snake_case_    ,j + 1    ,snake_case_						)
                or run_maze(snake_case_    ,i - 1    ,snake_case_    ,snake_case_						)
                or run_maze(snake_case_    ,snake_case_    ,j - 1    ,snake_case_						)
            ):
                return True

            __A   :						Any									=					0
            return False
    return False


if __name__ == "__main__":
       import doctest

       doctest.testmod()











"""simple docstring"""



from math import factorial







def 		__lowercase					(       snake_case_  :  int    ,snake_case_  :  int						)       ->int:



    '''simple docstring'''







    if n < k or k < 0:
        raise ValueError('''Please enter positive integers for n and k where n >= k'''						)
    return factorial(snake_case_						) // (factorial(snake_case_						) * factorial(n - k						))


if __name__ == "__main__":
       print(
           """The number of five-card hands possible from a standard""",
           f'''fifty-two card deck is: {combinations(52, 5)}\n''',
       )

       print(
           """If a class of 40 students must be arranged into groups of""",
           f'''4 for group projects, there are {combinations(40, 4)} ways''',
           """to arrange them.\n""",
       )

       print(
           """If 10 teams are competing in a Formula One race, there""",
           f'''are {combinations(10, 3)} ways that first, second and''',
           """third place can be awarded.""",
       )




