

from __future__ import annotations




def        lowerCAmelCase(	SCREAMING_SNAKE_CASE_       )->		list[int]:



    """simple docstring"""






    assert (
        isinstance(SCREAMING_SNAKE_CASE_       ,		SCREAMING_SNAKE_CASE_       ) and mask > 0
    ), f"mask needs to be positive integer, your input {mask}"
    UpperCamelCase_          =		[]
    UpperCamelCase_          =		mask

    while submask:
        all_submasks.append(SCREAMING_SNAKE_CASE_       )
        UpperCamelCase_          =		(submask - 1) & mask

    return all_submasks


if __name__ == "__main__":
 import doctest

 doctest.testmod()





def        __a     (    lowerCAmelCase_   :					int				)      -> int:






						'''simple docstring'''



						if number != int(lowerCAmelCase_				):
												raise ValueError("""factorial() only accepts integral values"""				)
						if number < 0:
												raise ValueError("""factorial() not defined for negative values"""				)
						UpperCAmelCase_=   1
						for i in range(1			,number + 1				):
												value *= i
						return value



def        __a     (    lowerCAmelCase_   :					int				)      -> int:






						'''simple docstring'''



						if not isinstance(lowerCAmelCase_			,lowerCAmelCase_				):
												raise ValueError("""factorial() only accepts integral values"""				)
						if n < 0:
												raise ValueError("""factorial() not defined for negative values"""				)
						return 1 if n == 0 or n == 1 else n * factorial(n - 1				)


if __name__ == "__main__":
	import doctest

	doctest.testmod()

	__A				    =						int(input('''Enter a positive integer: ''').strip() or 0)
	print(f'factorial{n} is {factorial(n)}')




