
def        __UpperCamelCase					(    lowerCAmelCase__							:    int = 6_0_0_8_5_1_4_7_5_1_4_3  ):

 try:
  __a			:  Tuple		    =  int(lowerCAmelCase__  )
 except (TypeError, ValueError):
  raise TypeError('''Parameter n must be int or castable to int.'''  )
 if n <= 0:
  raise ValueError('''Parameter n must be greater than or equal to one.'''  )
 __a			:  str		    =  2
 __a			:  Tuple		    =  0
 if n == 2:
  return 2
 while n > 2:
  while n % i != 0:
   i += 1
  __a			:  Dict		    =  i
  while n % i == 0:
   __a			:  int		    =  n // i
  i += 1
 return int(lowerCAmelCase__  )


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


from math import pi, sqrt




def        __UpperCamelCase					(    lowerCAmelCase__							:    float  ):
 if num <= 0:
  raise ValueError('''math domain error'''  )
 if num > 1_71.5:
  raise OverflowError('''math range error'''  )
 elif num - int(lowerCAmelCase__  ) not in (0, 0.5):
  raise NotImplementedError('''num must be an integer or a half-integer'''  )
 elif num == 0.5:
  return sqrt(lowerCAmelCase__  )
 else:
  return 1.0 if num == 1 else (num - 1) * gamma(num - 1  )




def        __UpperCamelCase					(    ):
 assert gamma(0.5  ) == sqrt(lowerCAmelCase__  )
 assert gamma(1  ) == 1.0
 assert gamma(2  ) == 1.0


if __name__ == "__main__":
      from doctest import testmod

      testmod()
      lowercase__          =1.0
      while num:
            lowercase__          =float(input('Gamma of: '))
            print(F"""gamma({num}) = {gamma(num)}""")
            print('\nEnter 0 to exit...')
