Sum of even numbers
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
The program processes a sequence of integers, which concludes with the number 0. Your task is to calculate the sum of all even numbers in this sequence, not including the final zero.
Input
A sequence of integers, with each number provided on a separate line.
Output
A single integer representing the sum of the even numbers in the sequence.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 7K
Acceptance rate 63%