Medium
Shopping Cart
Write a
Cart with add(item, price, qty) and total(). Read n lines item price qty and print the item count (sum of qty) and the total.Input
n, then n lines.
Output
Two numbers.
Sample 1
Input
2 pen 10 3 book 120 1
Output
4 150
Sample 2
Input
1 tea 20 5
Output
5 100
Output appears here