


'''simple docstring'''







def 			lowercase				(_A					):







       """simple docstring"""







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

       _lowerCAmelCase    :							Dict   			=       [True] * (num + 1)

       _lowerCAmelCase    :							Dict   			=       2
       while p * p <= num:
              if primes[p]:
                     for i in range(p * p   ,						num + 1   ,						_lowerCamelCase					):
                            _lowerCAmelCase    :							List[Any]   			=       False
              p += 1

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


if __name__ == "__main__":
       import doctest

       doctest.testmod()

       lowerCAmelCase    :     Tuple					=						int(input("""Enter a positive integer: """).strip())
       print(prime_sieve_eratosthenes(user_num))





'''simple docstring'''







import unittest

from knapsack import greedy_knapsack as kp
class 	UpperCamelCase__					( unittest.TestCase	):



     """simple docstring"""






     def a	( self   ):

            '''simple docstring'''

            _lowerCAmelCase    :							Union[str, Any]   			=       [10, 20, 30, 40, 50, 60]
            _lowerCAmelCase    :							Union[str, Any]   			=       [2, 4, 6, 8, 10, 12]
            _lowerCAmelCase    :							Dict   			=       100
            self.assertEqual(kp.calc_profit(snake_case__      ,	snake_case__      ,	snake_case__   )      ,	210   )







     def a	( self   ):

            '''simple docstring'''

            self.assertRaisesRegex(snake_case__      ,	'max_weight must greater than zero.'   )







     def a	( self   ):

            '''simple docstring'''

            self.assertRaisesRegex(snake_case__      ,	'Weight can not be negative.'   )







     def a	( self   ):

            '''simple docstring'''

            self.assertRaisesRegex(snake_case__      ,	'Profit can not be negative.'   )







     def a	( self   ):

            '''simple docstring'''

            self.assertRaisesRegex(snake_case__      ,	'max_weight must greater than zero.'   )







     def a	( self   ):

            '''simple docstring'''

            self.assertRaisesRegex(
                snake_case__      ,	'The length of profit and weight must be same.'   )


if __name__ == "__main__":
       unittest.main()

