


from __future__ import annotations



def      _lowerCAmelCase  (							lowerCAmelCase_							:int							)->list[int]:
   '''simple docstring'''






   snake_case_         =   [0] * max_one

   for i in range(0						,  lowerCAmelCase_							):
      snake_case_         =   i

   for i in range(2						,  lowerCAmelCase_							):
      if totients[i] == i:
         for j in range(lowerCAmelCase_						,  lowerCAmelCase_						,  lowerCAmelCase_							):
            totients[j] -= totients[j] // i

   return totients



def      _lowerCAmelCase  (							lowerCAmelCase_							:int						,  lowerCAmelCase_							:int							)->bool:
   '''simple docstring'''






   return sorted(str(lowerCAmelCase_							)							) == sorted(str(lowerCAmelCase_							)							)



def      _lowerCAmelCase  (							lowerCAmelCase_							:int = 10_000_000							)->int:
   '''simple docstring'''






   snake_case_         =   1  # i
   snake_case_         =   0  # φ(i)
   snake_case_         =   get_totients(max_n + 1							)

   for i in range(2						,  max_n + 1							):
      snake_case_         =   totients[i]

      if i * min_denominator < min_numerator * t and has_same_digits(lowerCAmelCase_						,  lowerCAmelCase_							):
         snake_case_         =   i
         snake_case_         =   t

   return min_numerator


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








from .prime_check import Test

Test()




