The 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: "the last must be the first". Please print the list with the results to help Ethan disable the weapon.

Sample Input 1:

expetum axio lithigum magnum anima

Sample Output 1:

[anima, magnum, lithigum, axio, expetum]
Write a program in Kotlin
import java.util.*

fun main() {
val list = readln().split(" ")
val res = mutableListOf<String>()

// write your code here

println(res)
}
___

Create a free account to access the full topic