

"""simple docstring"""
import math




def 					a__						(						lowerCAmelCase    )	-> list[int]:
      UpperCAmelCase__			:							Optional[int]							=    []
      UpperCAmelCase__			:							Union[str, Any]							=    2
      UpperCAmelCase__			:							List[Any]							=    int(math.sqrt(lowerCAmelCase    )    )  # Size of every segment
      UpperCAmelCase__			:							Dict							=    [True] * (end + 1)
      UpperCAmelCase__			:							str							=    []

      while start <= end:
            if temp[start] is True:
                  in_prime.append(lowerCAmelCase    )
                  for i in range(start * start			,	end + 1			,	lowerCAmelCase    ):
                        UpperCAmelCase__			:							Optional[Any]							=    False
            start += 1
      prime += in_prime

      UpperCAmelCase__			:							Optional[Any]							=    end + 1
      UpperCAmelCase__			:							Dict							=    min(2 * end			,	lowerCAmelCase    )

      while low <= n:
            UpperCAmelCase__			:							Optional[int]							=    [True] * (high - low + 1)
            for each in in_prime:
                  UpperCAmelCase__			:							Optional[int]							=    math.floor(low / each    ) * each
                  if t < low:
                        t += each

                  for j in range(lowerCAmelCase			,	high + 1			,	lowerCAmelCase    ):
                        UpperCAmelCase__			:							int							=    False

            for j in range(len(lowerCAmelCase    )    ):
                  if temp[j] is True:
                        prime.append(j + low    )

            UpperCAmelCase__			:							Dict							=    high + 1
            UpperCAmelCase__			:							int							=    min(high + end			,	lowerCAmelCase    )

      return prime





print(sieve(10**6))




"""simple docstring"""
from __future__ import annotations

from functools import lru_cache
from math import ceil

_A							=  1_00

_A							=  set(range(3, NUM_PRIMES, 2))
primes.add(2)
_A							=  42

for prime in range(3, ceil(NUM_PRIMES**0.5), 2):
    if prime not in primes:
        continue
    primes.difference_update(set(range(prime * prime, NUM_PRIMES, prime)))




@lru_cache(maxsize=1_00    )
def 					a__						(						lowerCAmelCase    )	-> set[int]:
      if number_to_partition < 0:
            return set()
      elif number_to_partition == 0:
            return {1}

      UpperCAmelCase__			:							set[int]							=    set()
      UpperCAmelCase__			:							int
      UpperCAmelCase__			:							int

      for prime in primes:
            if prime > number_to_partition:
                  continue
            for sub in partition(number_to_partition - prime    ):
                  ret.add(sub * prime    )

      return ret




def 					a__						(						lowerCAmelCase = 50_00    )	-> int | None:
      for number_to_partition in range(1			,	lowerCAmelCase    ):
            if len(partition(lowerCAmelCase    )    ) > number_unique_partitions:
                  return number_to_partition
      return None


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

