





import unittest

from knapsack import greedy_knapsack as kp



class        _lowerCAmelCase    (			unittest.TestCase							):


  '''simple docstring'''







  def UpperCamelCase_ (      self      :					Optional[Any]							):


    '''simple docstring'''





    _snake_case   :				str														=	[10, 20, 30, 40, 50, 60]
    _snake_case   :				str														=	[2, 4, 6, 8, 10, 12]
    _snake_case   :				List[str]														=	1_00
    self.assertEqual(kp.calc_profit(UpperCamelCase      ,				UpperCamelCase      ,				UpperCamelCase							)      ,				2_10							)







  def UpperCamelCase_ (      self      :					List[Any]							):


    '''simple docstring'''





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







  def UpperCamelCase_ (      self      :					Tuple							):


    '''simple docstring'''





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







  def UpperCamelCase_ (      self      :					Optional[int]							):


    '''simple docstring'''





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







  def UpperCamelCase_ (      self      :					Dict							):


    '''simple docstring'''





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







  def UpperCamelCase_ (      self      :					Optional[int]							):


    '''simple docstring'''





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


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











def     lowerCamelCase_	(      lowerCAmelCase:	int				)->		list:
  _snake_case   :				List[Any]														=	int(lowerCAmelCase				)
  if n_element < 1:
    _snake_case   :				int														=	ValueError('a should be a positive number'				)
    raise my_error

  _snake_case   :				Union[str, Any]														=	[1]
  _snake_case							,					_snake_case							,					_snake_case   :				Any														=	(0, 0, 0)
  _snake_case   :				str														=	1
  while index < n_element:
    while hamming_list[i] * 2 <= hamming_list[-1]:
      i += 1
    while hamming_list[j] * 3 <= hamming_list[-1]:
      j += 1
    while hamming_list[k] * 5 <= hamming_list[-1]:
      k += 1
    hamming_list.append(
        min(hamming_list[i] * 2    ,							hamming_list[j] * 3    ,							hamming_list[k] * 5				)				)
    index += 1
  return hamming_list


if __name__ == "__main__":
      lowerCAmelCase_						   =    input("""Enter the last number (nth term) of the Hamming Number Series: """)
      print("""Formula of Hamming Number Series => 2^i * 3^j * 5^k""")
      lowerCAmelCase_						   =    hamming(int(n))
      print("""-----------------------------------------------------""")
      print(F"""The list with nth numbers is: {hamming_numbers}""")
      print("""-----------------------------------------------------""")




