

"""simple docstring"""




def 	lowerCAmelCase    (       __UpperCamelCase   ):
 '''simple docstring'''





 try:
  UpperCAmelCase__       :	Union[str, Any]        =       float(__UpperCamelCase   )
 except ValueError:
  raise ValueError("""Please enter a valid number"""   )
 UpperCAmelCase__       :	List[str]        =       decimal - int(__UpperCamelCase   )
 if fractional_part == 0:
  return int(__UpperCamelCase   ), 1
 else:
  UpperCAmelCase__       :	Optional[Any]        =       len(str(__UpperCamelCase   ).split("""."""   )[1]   )
  UpperCAmelCase__       :	List[Any]        =       int(decimal * (10**number_of_frac_digits)   )
  UpperCAmelCase__       :	Any        =       10**number_of_frac_digits
  UpperCAmelCase__ ,   UpperCAmelCase__       :	int        =       denominator, numerator
  while True:
   UpperCAmelCase__       :	int        =       dividend % divisor
   if remainder == 0:
    break
   UpperCAmelCase__ ,   UpperCAmelCase__       :	Optional[Any]        =       divisor, remainder
  UpperCAmelCase__ ,   UpperCAmelCase__       :	int        =       numerator / divisor, denominator / divisor
  return int(__UpperCamelCase   ), int(__UpperCamelCase   )


if __name__ == "__main__":
      print(F"{decimal_to_fraction(2) = }")
      print(F"{decimal_to_fraction(89.0) = }")
      print(F"{decimal_to_fraction('67') = }")
      print(F"{decimal_to_fraction('45.0') = }")
      print(F"{decimal_to_fraction(1.5) = }")
      print(F"{decimal_to_fraction('6.25') = }")
      print(F"{decimal_to_fraction('78td') = }")











from __future__ import annotations

from fractions import Fraction




def 		lowerCAmelCase_ (						lowerCamelCase						,  lowerCamelCase ):
				return (
				    num != den and num % 10 == den // 10 and (num // 10) / (den % 10) == num / den
				)




def 		lowerCAmelCase_ (						lowerCamelCase ):
				__magic_name__						:						List[str]										=[]
				__magic_name__						:						List[Any]										=11
				__magic_name__						:						Tuple										=int("""1""" + """0""" * digit_len )
				for num in range(lowerCamelCase						,  lowerCamelCase ):
								while den <= 99:
												if (num != den) and (num % 10 == den // 10) and (den % 10 != 0):
																if is_digit_cancelling(lowerCamelCase						,  lowerCamelCase ):
																				solutions.append(F"{num}/{den}" )
												den += 1
								num += 1
								__magic_name__						:						List[str]										=10
				return solutions




def 		lowerCAmelCase_ (						lowerCamelCase = 2 ):
				__magic_name__						:						str										=1.0
				for fraction in fraction_list(lowerCamelCase ):
								__magic_name__						:						int										=Fraction(lowerCamelCase )
								result *= frac.denominator / frac.numerator
				return int(lowerCamelCase )


if __name__ == "__main__":
							print(solution())




