Stock Report (Inventory Manager)
Add query item, which immediately prints item: qty (0 when missing). After all commands print the report, then total T where T is the sum of all quantities, and items K for how many items remain.
Input: n, then add/remove/query lines.
Output: Query answers as they happen, the report, then total and items.
Difficulty: Medium. Write your answer in the browser editor, run the examples, then submit it against hidden tests. Python and JavaScript are free; other languages are part of licode Club.
Hint
- Queries print in the middle; the report prints at the end.