def 							lowerCAmelCase__    (       a__      )	->int:




  '''simple docstring'''

  if number != int(a__      ):
    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 							lowerCAmelCase__    (       a__      )	->int:




  '''simple docstring'''

  if not isinstance(a__  ,			a__      ):
    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()

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





from itertools import combinations, product


def 							lowerCAmelCase__    (       a__  ,			a__  ,			a__  ,			a__      )	->bool:




  '''simple docstring'''

  if xa == ya == 0 or xa == ya == 0:
    return False
  _UpperCamelCase				=  xa * xa + ya * ya
  _UpperCamelCase				=  xa * xa + ya * ya
  _UpperCamelCase				=  (xa - xa) * (xa - xa) + (ya - ya) * (ya - ya)
  return (
      a_square + b_square == c_square
      or a_square + c_square == b_square
      or b_square + c_square == a_square
  )


def 							lowerCAmelCase__    (       a__ = 50      )	->int:




  '''simple docstring'''

  return sum(
      1
      for pta, pta in combinations(product(range(limit + 1      )  ,			repeat=2      )  ,			2      )
      if is_right(*a__  ,			*a__      )      )


if __name__ == "__main__":
   print(F"{solution() = }")




