LearnPy Hub
← Input problems
Medium

Read Until Zero

Keep reading integers (one per line) until a 0 appears. Print how many numbers were read before the 0 and their total.

Input

Integers, the last one 0.

Output

One line.

Sample 1

Input
5
3
0
Output
2 8

Sample 2

Input
0
Output
0 0
solution.py
Output appears here
Read Until Zero · Python practice problem · LearnPy Hub