
'''simple docstring'''

from functools import lru_cache






@lru_cache
def 	_snake_case						(      A_       :    int   ):
  """simple docstring"""







  if num < 0:
    raise ValueError("""Number should not be negative."""   )

  return 1 if num in (0, 1) else num * factorial(num - 1   )


if __name__ == "__main__":
    import doctest

    doctest.testmod()




'''simple docstring'''

from __future__ import annotations






def 	_snake_case						(      A_       :    int   ):
  """simple docstring"""







  a_      :	Optional[Any]      =							2
  a_      :	int      =							[]
  while i * i <= n:
    if n % i:
      i += 1
    else:
      n //= i
      factors.append(A_   )
  if n > 1:
    factors.append(A_   )
  return factors


if __name__ == "__main__":
    import doctest

    doctest.testmod()


