結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー uchida_tuchida_t
提出日時 2023-04-06 13:10:40
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 602 ms / 2,000 ms
コード長 187 bytes
コンパイル時間 11,666 ms
コンパイル使用メモリ 432,476 KB
実行使用メモリ 107,532 KB
最終ジャッジ日時 2024-04-10 10:36:20
合計ジャッジ時間 21,467 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 316 ms
56,888 KB
testcase_01 AC 311 ms
56,932 KB
testcase_02 AC 307 ms
56,984 KB
testcase_03 AC 313 ms
56,956 KB
testcase_04 AC 306 ms
56,856 KB
testcase_05 AC 318 ms
56,984 KB
testcase_06 AC 356 ms
57,132 KB
testcase_07 AC 475 ms
61,348 KB
testcase_08 AC 507 ms
67,548 KB
testcase_09 AC 545 ms
69,744 KB
testcase_10 AC 593 ms
107,508 KB
testcase_11 AC 583 ms
107,380 KB
testcase_12 AC 580 ms
107,428 KB
testcase_13 AC 582 ms
107,376 KB
testcase_14 AC 583 ms
107,532 KB
testcase_15 AC 594 ms
107,352 KB
testcase_16 AC 602 ms
107,532 KB
testcase_17 AC 320 ms
56,940 KB
testcase_18 AC 315 ms
56,936 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args: Array<String>){
         ^

ソースコード

diff #

fun main(args: Array<String>){
	val n = readLine()!!.toInt()
	val array = readLine()!!.split(" ").map { it.toLong() }
	var sum = 0L
	for (j in 0..n-1) {
		sum+=array[j]
	}
	println(sum)
}
0