結果

問題 No.9009 改行区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー uchida_tuchida_t
提出日時 2023-04-07 12:47:00
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 429 ms / 3,000 ms
コード長 168 bytes
コンパイル時間 12,271 ms
コンパイル使用メモリ 423,308 KB
実行使用メモリ 79,188 KB
最終ジャッジ日時 2024-04-10 16:13:07
合計ジャッジ時間 19,946 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 277 ms
50,648 KB
testcase_01 AC 283 ms
54,380 KB
testcase_02 AC 276 ms
54,244 KB
testcase_03 AC 274 ms
54,244 KB
testcase_04 AC 283 ms
54,484 KB
testcase_05 AC 285 ms
54,364 KB
testcase_06 AC 314 ms
54,420 KB
testcase_07 AC 381 ms
58,532 KB
testcase_08 AC 403 ms
60,816 KB
testcase_09 AC 397 ms
62,488 KB
testcase_10 AC 429 ms
74,876 KB
testcase_11 AC 429 ms
74,852 KB
testcase_12 AC 427 ms
75,508 KB
testcase_13 AC 420 ms
75,688 KB
testcase_14 AC 426 ms
76,404 KB
testcase_15 AC 423 ms
76,620 KB
testcase_16 AC 429 ms
79,188 KB
testcase_17 AC 276 ms
54,304 KB
testcase_18 AC 278 ms
54,236 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args: Array<String>){
         ^

ソースコード

diff #

fun main(args: Array<String>){
	var a = readLine()!!.toInt()
	var sum = 0L
	var num = 0
	while (num != a) {
		sum += readLine()!!.toLong()
		num += 1
	}
	println(sum)
}
0