Loading...
Loading...
Loading...
A shop stores order amounts in a linked list. Print how many orders there are and their total amount.
Example
Input
40 25 10 5
Output
4 80
Try the problem first. Open one hint at a time.
Walk once, adding 1 to a counter and the value to a total.
Python integers do not overflow, so large totals are fine.
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor