結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー da_louisda_louis
提出日時 2020-02-07 00:00:03
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 652 ms / 2,000 ms
コード長 207 bytes
コンパイル時間 11,752 ms
コンパイル使用メモリ 452,012 KB
実行使用メモリ 87,184 KB
最終ジャッジ日時 2023-10-25 22:47:54
合計ジャッジ時間 21,699 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 309 ms
54,344 KB
testcase_01 AC 307 ms
54,344 KB
testcase_02 AC 310 ms
54,348 KB
testcase_03 AC 306 ms
54,344 KB
testcase_04 AC 307 ms
54,348 KB
testcase_05 AC 312 ms
54,400 KB
testcase_06 AC 354 ms
54,608 KB
testcase_07 AC 472 ms
59,424 KB
testcase_08 AC 501 ms
59,428 KB
testcase_09 AC 513 ms
59,708 KB
testcase_10 AC 626 ms
82,264 KB
testcase_11 AC 624 ms
82,256 KB
testcase_12 AC 625 ms
82,260 KB
testcase_13 AC 626 ms
82,264 KB
testcase_14 AC 629 ms
82,264 KB
testcase_15 AC 630 ms
82,268 KB
testcase_16 AC 652 ms
87,184 KB
testcase_17 AC 306 ms
54,344 KB
testcase_18 AC 307 ms
54,344 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^
Main.kt:6:9: warning: variable 'n' is never used
    val n = readLine()!!.toInt()
        ^

ソースコード

diff #

fun main(args: Array<String>) {
    p9008()
}

fun p9008() {
    val n = readLine()!!.toInt()
    val aList = readLine()!!.split(' ').map { it.toLong() }

    val answer = aList.sum()

    println(answer)
}
0