




from __future__ import annotations





def   lowerCAmelCase_ (				__lowerCAmelCase		,					__lowerCAmelCase		,					__lowerCAmelCase						)->  tuple[float, float]:






      '''simple docstring'''





      assert (
          c % greatest_common_divisor(__lowerCAmelCase		,					__lowerCAmelCase						) == 0
      )  # greatest_common_divisor(a,b) function implemented below
      (UpperCAmelCase)    : Optional[int]      =extended_gcd(__lowerCAmelCase		,					__lowerCAmelCase						)  # extended_gcd(a,b) function implemented below
      UpperCAmelCase    : str      =c / d
      return (r * x, r * y)





def   lowerCAmelCase_ (				__lowerCAmelCase		,					__lowerCAmelCase		,					__lowerCAmelCase		,					__lowerCAmelCase = 2						)->  None:






      '''simple docstring'''





      (UpperCAmelCase)    : Tuple      =diophantine(__lowerCAmelCase		,					__lowerCAmelCase		,					__lowerCAmelCase						)  # Initial value
      UpperCAmelCase    : Optional[int]      =greatest_common_divisor(__lowerCAmelCase		,					__lowerCAmelCase						)
      UpperCAmelCase    : Any      =a // d
      UpperCAmelCase    : List[Any]      =b // d

      for i in range(__lowerCAmelCase						):
            UpperCAmelCase    : Union[str, Any]      =xa + i * q
            UpperCAmelCase    : int      =ya - i * p
            print(__lowerCAmelCase		,					__lowerCAmelCase						)





def   lowerCAmelCase_ (				__lowerCAmelCase		,					__lowerCAmelCase						)->  int:






      '''simple docstring'''





      if a < b:
            UpperCAmelCase    : Optional[int]      =b, a

      while a % b != 0:
            UpperCAmelCase    : Optional[Any]      =b, a % b

      return b





def   lowerCAmelCase_ (				__lowerCAmelCase		,					__lowerCAmelCase						)->  tuple[int, int, int]:






      '''simple docstring'''





      assert a >= 0 and b >= 0

      if b == 0:
            UpperCAmelCase    : List[str]      =a, 1, 0
      else:
            (UpperCAmelCase)    : Union[str, Any]      =extended_gcd(__lowerCAmelCase		,					a % b						)
            UpperCAmelCase    : Union[str, Any]      =q
            UpperCAmelCase    : Dict      =p - q * (a // b)

      assert a % d == 0 and b % d == 0
      assert d == a * x + b * y

      return (d, x, y)


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

     testmod(name='''diophantine''', verbose=True)
     testmod(name='''diophantine_all_soln''', verbose=True)
     testmod(name='''extended_gcd''', verbose=True)
     testmod(name='''greatest_common_divisor''', verbose=True)

from collections import defaultdict





def   lowerCAmelCase_ (				__lowerCAmelCase = 5						)->  int:






      '''simple docstring'''





      UpperCAmelCase    : List[str]      =defaultdict(__lowerCAmelCase						)
      UpperCAmelCase    : Tuple      =0

      while True:
            UpperCAmelCase    : Any      =get_digits(__lowerCAmelCase						)
            freqs[digits].append(__lowerCAmelCase						)

            if len(freqs[digits]						) == max_base:
                  UpperCAmelCase    : Optional[int]      =freqs[digits][0] ** 3
                  return base

            num += 1





def   lowerCAmelCase_ (				__lowerCAmelCase						)->  str:






      '''simple docstring'''





      return "".join(sorted(str(num**3						)						)						)


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