LearnPy Hub
← Input problems
Hard

Receipt

Read n, then n lines of item qty price. Print each item as item x qty = total and finally TOTAL: sum. Totals are whole numbers.

Input

n, then n lines.

Output

n + 1 lines.

Sample 1

Input
2
pen 3 10
book 1 120
Output
pen x 3 = 30
book x 1 = 120
TOTAL: 150

Sample 2

Input
1
tea 5 20
Output
tea x 5 = 100
TOTAL: 100
solution.py
Output appears here
Receipt · Python practice problem · LearnPy Hub