Sum of values

Report a typo

You are given Map<Int, Int> as input. Return the sum of all values that have even keys.

Sample Input 1:

{100 to 10}, {55 to 3}, {112 to 5}

Sample Output 1:

15

Sample Input 2:

{1 to 2}, {10 to 5}

Sample Output 2:

5
Write a program in Kotlin
fun summator(map: Map<Int, Int>): Int {
// put your code here
}
___

Create a free account to access the full topic