Hard
Inventory Report
Write
Item (name, qty, price) with value(), and Inventory with add(item), low_stock(limit) and total_value(). Read n items and a limit; print low-stock names sorted (or none) and the total value.Input
n, n lines 'name qty price', then a limit.
Output
Two lines.
Sample 1
Input
3 pen 5 10 book 1 200 bag 20 500 6
Output
book pen 10250
Sample 2
Input
1 x 10 1 5
Output
none 10
Output appears here