input: Write a function to calculate the maximum possible revenue from the items with given weights and values. The function should take three parameters: weights (a list of integers), values (a list of integers), and n (the number of items). It should return the maximum revenue that can be obtained with a knapsack of capacity 5.
  assert knapsack([2, 1, 3], [4, 2, 3], 3) == 7
  assert knapsack([1, 2, 3], [1, 2, 3], 3) == 5
  assert knapsack([1, 1, 1], [10, 20, 30], 3) == 50
  assert knapsack([], [], 0) == 0
  assert knapsack([1], [1], 1) == 1
output: def knapsack(weights, values, n):
      capacity = 5
      dp = [0] * (capacity + 1)
      for i in range(n):
          for w in range(capacity, weights[i] - 1, -1):
              dp[w] = max(dp[w], dp[w - weights[i]] + values[i])
      return dp[capacity]