code.kt:2:23: error: only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type String?
    val n = readLine().toInt()
                      ^
code.kt:4:9: error: only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type String?
        .split(' ')
        ^