Data stream processing - 1
Problem
Given a non-empty sequence of integers ending in zero. Zero is not included in the sequence, it serves as a sign of its end. Find the sum of all numbers in the sequence greater than
x
. If there are no such numbers in the sequence, then print
0
.
Input
The first line specifies the number
x
, then (from the second line) the numbers of the sequence are specified. Zero - a sign of the end of input.
Imprint
Print the answer to the problem.
Examples
# |
Input |
Output |
1 |
3
5
3
4
7
0 |
16 |
Запрещенные операторы: break
; list
; [