結果

問題 No.9009 改行区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー da_louisda_louis
提出日時 2020-02-07 00:04:56
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 467 ms / 3,000 ms
コード長 198 bytes
コンパイル時間 11,539 ms
コンパイル使用メモリ 438,524 KB
実行使用メモリ 61,744 KB
最終ジャッジ日時 2023-10-25 22:48:40
合計ジャッジ時間 18,716 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 284 ms
55,092 KB
testcase_01 AC 285 ms
55,108 KB
testcase_02 AC 283 ms
55,100 KB
testcase_03 AC 282 ms
55,092 KB
testcase_04 AC 284 ms
55,116 KB
testcase_05 AC 289 ms
55,164 KB
testcase_06 AC 320 ms
55,336 KB
testcase_07 AC 387 ms
59,316 KB
testcase_08 AC 416 ms
60,160 KB
testcase_09 AC 422 ms
59,884 KB
testcase_10 AC 453 ms
61,732 KB
testcase_11 AC 463 ms
61,692 KB
testcase_12 AC 453 ms
61,744 KB
testcase_13 AC 450 ms
61,736 KB
testcase_14 AC 455 ms
61,732 KB
testcase_15 AC 460 ms
61,736 KB
testcase_16 AC 467 ms
61,740 KB
testcase_17 AC 286 ms
55,108 KB
testcase_18 AC 282 ms
55,108 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

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

fun p9009() {
    val n = readLine()!!.toInt()
    val aList = Array(n) { readLine()!!.toLong() }

    val answer = aList.sum()

    println(answer)
}
0