結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー toshiro_yanagitoshiro_yanagi
提出日時 2018-10-06 18:45:29
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 1,202 ms / 2,000 ms
コード長 218 bytes
コンパイル時間 11,212 ms
コンパイル使用メモリ 427,124 KB
実行使用メモリ 100,112 KB
最終ジャッジ日時 2024-04-30 19:25:31
合計ジャッジ時間 26,285 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 354 ms
55,188 KB
testcase_01 AC 356 ms
55,176 KB
testcase_02 AC 353 ms
55,240 KB
testcase_03 AC 354 ms
55,032 KB
testcase_04 AC 355 ms
55,168 KB
testcase_05 AC 363 ms
55,388 KB
testcase_06 AC 467 ms
57,788 KB
testcase_07 AC 550 ms
65,192 KB
testcase_08 AC 755 ms
88,040 KB
testcase_09 AC 832 ms
88,116 KB
testcase_10 AC 1,123 ms
99,352 KB
testcase_11 AC 1,136 ms
98,704 KB
testcase_12 AC 1,124 ms
99,164 KB
testcase_13 AC 1,148 ms
98,824 KB
testcase_14 AC 1,169 ms
100,112 KB
testcase_15 AC 1,177 ms
99,292 KB
testcase_16 AC 1,202 ms
99,224 KB
testcase_17 AC 346 ms
55,320 KB
testcase_18 AC 348 ms
55,256 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:3:10: warning: parameter 'args' is never used
fun main(args: Array<String>) {
         ^

ソースコード

diff #

import java.util.*

fun main(args: Array<String>) {
    val cin = Scanner(System.`in`)
    val N = cin.nextInt()

    var ans = 0.toLong()

    for (i in 1..N) {
        ans += cin.nextLong()
    }

    println(ans)
}
0