



from __future__ import annotations







def       lowerCamelCase_  (    _a       :						int   ,		_a       :						list[int]   ,		_a       :						list[int]   ,		_a       :						int    ):



    '''simple docstring'''




    if counter == 0 or capacity == 0:
        return 0

    # If weight of the nth item is more than Knapsack of capacity,
    #   then this item cannot be included in the optimal solution,
    # else return the maximum of two cases:
    #   (1) nth item included
    #   (2) not included
    if weights[counter - 1] > capacity:
        return knapsack(_a   ,		_a   ,		_a   ,		counter - 1    )
    else:
        UpperCAmelCase_     :       Union[str, Any]  		=					capacity - weights[counter - 1]
        UpperCAmelCase_     :       int  		=					values[counter - 1] + knapsack(
            _a   ,		_a   ,		_a   ,		counter - 1    )
        UpperCAmelCase_     :       Optional[Any]  		=					knapsack(_a   ,		_a   ,		_a   ,		counter - 1    )
        return max(_a   ,		_a    )


if __name__ == "__main__":
      import doctest

      doctest.testmod()






def   A		(__A  :       int			)  -> int:







     """simple docstring"""


     if not isinstance(__A  ,							__A			):
          UpperCAmelCase_		=				F"""Input value of [number={number}] must be an integer"""
          raise TypeError(__A			)
     if number < 1:
          raise ValueError('''Input must be a positive integer'''			)
     return number * (2 * number - 1)


if __name__ == "__main__":
    import doctest

    doctest.testmod()






