/* * This Kotlin script reads in a positive integer n, * then reads in n more integers, * adds up all the n integers, * and prints the result. */ val n = readLine()!!.toInt() var acc = 0 repeat (n) { acc += readLine()!!.toInt() } println(acc)