Secret code to save the city

Report a typo

Ethan Hunt is ready for another "Mission: Impossible". To disable a chemical weapon, he must type the correct word combination. He only knows that the code is obtained in the following way: "get the first 3 words with the length greater than 5 characters and reverse them in upper case". Please help Ethan print the list and save us again.

Sample Input 1:

expetum axio lithigum magnum anima

Sample Output 1:

[MUTEPXE, MUGIHTIL, MUNGAM]
Write a program in Kotlin
fun main() {
val list = readln().split(" ").asSequence()
// write your code here

}
___

Create a free account to access the full topic