

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





				'''simple docstring'''


				if num <= 0:
								raise ValueError("Input must be a positive integer"      )

				snake_case__      :int         =   [True] * (num + 1)

				snake_case__      :Dict         =   2
				while p * p <= num:
								if primes[p]:
												for i in range(p * p	,	num + 1	,	__snake_case      ):
																snake_case__      :Optional[int]         =   False
								p += 1

				return [prime for prime in range(2	,	num + 1      ) if primes[prime]]


if __name__ == "__main__":
	import doctest

	doctest.testmod()

	__UpperCAmelCase							:   Optional[int]							=  int(input("Enter a positive integer: ").strip())
	print(prime_sieve_eratosthenes(user_num))







from ...utils import (
    OptionalDependencyNotAvailable,
    is_flax_available,
    is_torch_available,
    is_transformers_available,
)


try:
	if not (is_transformers_available() and is_torch_available()):
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	from ...utils.dummy_torch_and_transformers_objects import *  # noqa F403
else:
	from .multicontrolnet import MultiControlNetModel
	from .pipeline_controlnet import StableDiffusionControlNetPipeline
	from .pipeline_controlnet_imgaimg import StableDiffusionControlNetImgaImgPipeline
	from .pipeline_controlnet_inpaint import StableDiffusionControlNetInpaintPipeline


if is_transformers_available() and is_flax_available():
	from .pipeline_flax_controlnet import FlaxStableDiffusionControlNetPipeline