


'''simple docstring'''







def 				lowerCAmelCase__	(    lowerCamelCase					:      int = 3  ,lowerCamelCase					:      int = 7  ,lowerCamelCase					:      int = 1000000       ):
							_A					:     List[str]     = 0
							_A					:     Any     = 1

							for current_denominator in range(1  ,limit + 1       ):
														_A					:     str     = current_denominator * numerator // denominator
														if current_denominator % denominator == 0:
																					current_numerator -= 1
														if current_numerator * max_denominator > current_denominator * max_numerator:
																					_A					:     int     = current_numerator
																					_A					:     int     = current_denominator
							return max_numerator


if __name__ == "__main__":
			print(solution(numerator=3, denominator=7, limit=1000000))










'''simple docstring'''







def 				lowerCAmelCase__	(    lowerCamelCase					:      int = 10       ):
       if not isinstance(lowerCamelCase  ,lowerCamelCase       ) or n < 0:
              raise ValueError('Invalid input'       )
       _A					:     Optional[Any]     = 10**n
       _A					:     List[str]     = 28433 * (pow(2  ,7830457  ,lowerCamelCase       )) + 1
       return str(number % modulus       )


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

   testmod()
   print(f"""{solution(10) = }""")






