values. Pick the numbers that are both even and divisible by 3, and return their average rounded down to a whole number.
If there are no such numbers, return 0.values=[5, 12, 9, 18, 4, 30] → 20
12, 18 and 30 qualify (9 is odd, 4 is not divisible by 3): (12 + 18 + 30) / 3 = 20.
values=[6, 24, 3] → 15
6 and 24 qualify: (6 + 24) / 2 = 15.
values=[3, 8, 15] → 0
No number is both even and divisible by 3, so the answer is 0.
values ≤ 1000values[i] ≤ 1000values=[5, 12, 9, 18, 4, 30]
20
Run checks the first 3 tests in your browser. Submit checks all 115 tests on the server, hidden ones included.