Maximum element divisible by 4

Report a typo

You have a sequence of natural numbers that do not exceed 30000. Find the maximum element in the sequence divisible by 4. As input, the program first gets the number of elements in the sequence, and then the elements themselves. A sequence always has an element divisible by 4. The number of elements does not exceed 1000. The program should print a single number — the maximum sequence element (number) divisible by 4.

Sample Input 1:

12
38
15
36
80
44
12
27
63
88
46
16
49

Sample Output 1:

88
Write a program in Kotlin
fun main() {
// put your code here
}
___

Create a free account to access the full topic