






'''simple docstring'''



def  __UpperCAmelCase						(					SCREAMING_SNAKE_CASE__:						List[Any],       SCREAMING_SNAKE_CASE__:						str     )	->      Optional[int]:

   """simple docstring"""
   __a					  =     [1]
   for i in range(2,       SCREAMING_SNAKE_CASE__     ):
      factorials.append(factorials[-1] * i     )
   assert 0 <= k < factorials[-1] * n, "k out of bounds"

   __a					  =     []
   __a					  =     list(range(SCREAMING_SNAKE_CASE__     )     )

   # Find permutation
   while factorials:
      __a					  =     factorials.pop()
      __a  ,      __a					  =     divmod(SCREAMING_SNAKE_CASE__,       SCREAMING_SNAKE_CASE__     )
      permutation.append(elements[number]     )
      elements.remove(elements[number]     )
   permutation.append(elements[0]     )

   return permutation


if __name__ == "__main__":
 import doctest

 doctest.testmod()







'''simple docstring'''



from math import isqrt



def  __UpperCAmelCase						(					SCREAMING_SNAKE_CASE__:						int     )	->      bool:

   """simple docstring"""
   return all(number % divisor != 0 for divisor in range(2,       isqrt(SCREAMING_SNAKE_CASE__     ) + 1     )     )



def  __UpperCAmelCase						(					SCREAMING_SNAKE_CASE__:						int = 10**6     )	->      int:

   """simple docstring"""
   __a					  =     0
   __a					  =     1
   __a					  =     7
   while prime_candidate < max_prime:
      primes_count += is_prime(SCREAMING_SNAKE_CASE__     )

      cube_index += 1
      prime_candidate += 6 * cube_index

   return primes_count


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