




from itertools import compress, repeat
from math import ceil, sqrt

def   A   (   _SCREAMING_SNAKE_CASE					)			->				list[int]:

       if num <= 2:
              return []
       if num == 3:
              return [2]

       # Odd sieve for numbers in range [3, num - 1]
       lowerCamelCase     :   str    				=      bytearray(B"\x01"					) * ((num >> 1) - 1)

       for i in range(3				,int(sqrt(_SCREAMING_SNAKE_CASE					)					) + 1				,2					):
              if sieve[(i >> 1) - 1]:
                     lowerCamelCase     :   Tuple    				=      i**2
                     lowerCamelCase     :   str    				=      repeat(
                         0				,ceil((num - i_squared) / (i << 1)					)					)

       return [2] + list(compress(range(3				,_SCREAMING_SNAKE_CASE				,2					)				,_SCREAMING_SNAKE_CASE					)					)


if __name__ == "__main__":
       import doctest

       doctest.testmod()












from itertools import compress, repeat
from math import ceil, sqrt

def   A   (   _SCREAMING_SNAKE_CASE					)			->				list[int]:

       if num <= 2:
              return []
       if num == 3:
              return [2]

       # Odd sieve for numbers in range [3, num - 1]
       lowerCamelCase     :   str    				=      bytearray(B"\x01"					) * ((num >> 1) - 1)

       for i in range(3				,int(sqrt(_SCREAMING_SNAKE_CASE					)					) + 1				,2					):
              if sieve[(i >> 1) - 1]:
                     lowerCamelCase     :   Tuple    				=      i**2
                     lowerCamelCase     :   str    				=      repeat(
                         0				,ceil((num - i_squared) / (i << 1)					)					)

       return [2] + list(compress(range(3				,_SCREAMING_SNAKE_CASE				,2					)				,_SCREAMING_SNAKE_CASE					)					)


if __name__ == "__main__":
       import doctest

       doctest.testmod()






