




def 							_A       (						lowerCAmelCase_					: int = 3       ,    lowerCAmelCase_					: int = 7       ,    lowerCAmelCase_					: int = 100_0000      ):
     """simple docstring"""

     lowerCAmelCase__          =			0
     lowerCAmelCase__          =			1

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


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






from maths.prime_factors import prime_factors



def 							_A       (						lowerCAmelCase_					: int      ):
     """simple docstring"""

     if not isinstance(lowerCAmelCase_       ,    lowerCAmelCase_      ):
          lowerCAmelCase__          =			F'Input value of [number={number}] must be an integer'
          raise TypeError(lowerCAmelCase_      )
     if number < 1:
          raise ValueError("Input must be a positive integer"      )
     return -1 if len(prime_factors(lowerCAmelCase_      )      ) % 2 else 1


if __name__ == "__main__":
     import doctest

     doctest.testmod()
