Back
Close

Even Digits

Statement
The program
Your program must calculate the sum of even digits in a number N.

For example, 120789466, the result is 2+8+4+6+6=26
INPUT:
An integer number N

OUTPUT:
An integer number, the sum of even digits in N.

CONSTRAINTS:
0 ≤ N < 4294967296

EXAMPLE:
Input
120789466
Output
26
 

Game modes
Fastest, Shortest

Test cases
Test n°1 Test
Input
120789466
Output
26

Validator n°1 Validator
Input
120789488
Output
30

Test n°2 Test
Input
2
Output
2

Validator n°2 Validator
Input
4
Output
4

Test n°3 Test
Input
135797531
Output
0

Validator n°3 Validator
Input
531971335
Output
0

Test n°4 Test
Input
864222468
Output
42

Validator n°4 Validator
Input
684222682
Output
40

Test n°5 Test
Input
1000000000
Output
0

Validator n°5 Validator
Input
3000000000
Output
0

Test n°6 Test
Input
0
Output
0

Validator n°6 Validator
Input
0
Output
0

Test n°7 Test
Input
4294967295
Output
18

Validator n°7 Validator
Input
4294967294
Output
22

Solution language

Solution

Stub generator input