Back
Close

Korki Numbers

Statement

 Goal

You are given a list of numbers and you must find the sum of prime digits in this list, and in the output.
For example, you were given the list [45,69,73,133].
The primes in this list are 5,7,3,3,3, so you are needed to sum them.
Since 5+7+3+3+3 = 21, and there are still primes in this number, we will do this process again.
The only prime in this number is 2, and since you can't sum it with any other prime as there are no other primes in this number, you are to output 2.
If for example you are given a number with no primes at the end, you are to output 0.
Example: [4] will output 0, since there aren't any primes in this.
Input
First line: n - the length of the list
Second line: num - Every number in a list of numbers.
Output
A number between 0-10.
Constraints
0 <= num
Example
Input
1
4
Output
0

Game modes
Fastest, Shortest

Test cases
A Single Prime Digit Test
Input
1 4
Output
0

A Single Non-Prime Digit Validator
Input
1 7
Output
7

A List Of Numbers Test
Input
4 32 65 13 65
Output
0

Another List Of Numbers Validator
Input
4 54 32 4534 21
Output
2

Last list of numbers? Test
Input
3 7 3 1000
Output
10

Just big numbers, that's it. Validator
Input
3 21313131 123123121 1246465
Output
3

0? Test
Input
1 0
Output
0

Validator 4 Validator
Input
10 1 2 3 4 5 6 7 8 9 10
Output
7

Solution language

Solution

Stub generator input