


"""simple docstring"""






import math
def      lowerCamelCase       (     _UpperCamelCase		:      int							)		->       list[int]:

							'''simple docstring'''



							__UpperCAmelCase   :						List[Any]      							=					[]
							__UpperCAmelCase   :						Dict      							=					2
							__UpperCAmelCase   :						Union[str, Any]      							=					int(math.sqrt(_UpperCamelCase							)							)  # Size of every segment
							__UpperCAmelCase   :						Tuple      							=					[True] * (end + 1)
							__UpperCAmelCase   :						int      							=					[]

							while start <= end:
														if temp[start] is True:
																					in_prime.append(_UpperCamelCase							)
																					for i in range(start * start       ,			end + 1       ,			_UpperCamelCase							):
																												__UpperCAmelCase   :						Dict      							=					False
														start += 1
							prime += in_prime

							__UpperCAmelCase   :						Optional[int]      							=					end + 1
							__UpperCAmelCase   :						Dict      							=					min(2 * end       ,			_UpperCamelCase							)

							while low <= n:
														__UpperCAmelCase   :						Union[str, Any]      							=					[True] * (high - low + 1)
														for each in in_prime:
																					__UpperCAmelCase   :						Dict      							=					math.floor(low / each							) * each
																					if t < low:
																												t += each

																					for j in range(_UpperCamelCase       ,			high + 1       ,			_UpperCamelCase							):
																												__UpperCAmelCase   :						Tuple      							=					False

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

														__UpperCAmelCase   :						Tuple      							=					high + 1
														__UpperCAmelCase   :						Optional[int]      							=					min(high + end       ,			_UpperCamelCase							)

							return prime
print(sieve(10**6))




"""simple docstring"""






import math
def      lowerCamelCase       (     _UpperCamelCase		:      int							)		->       list[int]:

							'''simple docstring'''



							__UpperCAmelCase   :						List[Any]      							=					[]
							__UpperCAmelCase   :						Dict      							=					2
							__UpperCAmelCase   :						Union[str, Any]      							=					int(math.sqrt(_UpperCamelCase							)							)  # Size of every segment
							__UpperCAmelCase   :						Tuple      							=					[True] * (end + 1)
							__UpperCAmelCase   :						int      							=					[]

							while start <= end:
														if temp[start] is True:
																					in_prime.append(_UpperCamelCase							)
																					for i in range(start * start       ,			end + 1       ,			_UpperCamelCase							):
																												__UpperCAmelCase   :						Dict      							=					False
														start += 1
							prime += in_prime

							__UpperCAmelCase   :						Optional[int]      							=					end + 1
							__UpperCAmelCase   :						Dict      							=					min(2 * end       ,			_UpperCamelCase							)

							while low <= n:
														__UpperCAmelCase   :						Union[str, Any]      							=					[True] * (high - low + 1)
														for each in in_prime:
																					__UpperCAmelCase   :						Dict      							=					math.floor(low / each							) * each
																					if t < low:
																												t += each

																					for j in range(_UpperCamelCase       ,			high + 1       ,			_UpperCamelCase							):
																												__UpperCAmelCase   :						Tuple      							=					False

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

														__UpperCAmelCase   :						Tuple      							=					high + 1
														__UpperCAmelCase   :						Optional[int]      							=					min(high + end       ,			_UpperCamelCase							)

							return prime
print(sieve(10**6))
