



"""simple docstring"""




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

def 		__snake_case		(   SCREAMING_SNAKE_CASE__			:		int		)						->     list[int]:





     '''simple docstring'''

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

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

     for i in range(3		,						int(sqrt(SCREAMING_SNAKE_CASE__		)		) + 1		,						2		):
          if sieve[(i >> 1) - 1]:
               _UpperCAmelCase    :			int              =					i**2
               _UpperCAmelCase    :			Optional[Any]              =					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()





"""simple docstring"""




import sys

def 		__snake_case		(   SCREAMING_SNAKE_CASE__			:		int		,						SCREAMING_SNAKE_CASE__			:		list[int]       )						->     int:





     '''simple docstring'''

     if not numbers:
          return 0
     if target == 0 and target in numbers:
          return 0
     if not isinstance(SCREAMING_SNAKE_CASE__		,						(list, tuple)       ) or not all(
         isinstance(SCREAMING_SNAKE_CASE__		,						SCREAMING_SNAKE_CASE__       ) for number in numbers       ):
          raise ValueError("numbers must be an iterable of integers"       )

     _UpperCAmelCase    :			List[Any]              =					0
     _UpperCAmelCase    :			str              =					sys.maxsize

     while right < len(SCREAMING_SNAKE_CASE__       ):
          curr_sum += numbers[right]
          while curr_sum >= target and left <= right:
               _UpperCAmelCase    :			Any              =					min(SCREAMING_SNAKE_CASE__		,						right - left + 1       )
               curr_sum -= numbers[left]
               left += 1
          right += 1

     return 0 if min_len == sys.maxsize else min_len
