結果

問題 No.9009 改行区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー tsubuantsubuan
提出日時 2017-07-31 04:42:37
言語 Ruby
(3.3.0)
結果
AC  
実行時間 281 ms / 3,000 ms
コード長 67 bytes
コンパイル時間 335 ms
コンパイル使用メモリ 11,288 KB
実行使用メモリ 15,588 KB
最終ジャッジ日時 2023-08-26 17:17:11
合計ジャッジ時間 4,617 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
15,068 KB
testcase_01 AC 73 ms
15,256 KB
testcase_02 AC 70 ms
15,288 KB
testcase_03 AC 71 ms
15,280 KB
testcase_04 AC 71 ms
15,124 KB
testcase_05 AC 70 ms
15,076 KB
testcase_06 AC 70 ms
15,184 KB
testcase_07 AC 75 ms
15,588 KB
testcase_08 AC 94 ms
15,224 KB
testcase_09 AC 116 ms
15,240 KB
testcase_10 AC 244 ms
15,316 KB
testcase_11 AC 246 ms
15,188 KB
testcase_12 AC 247 ms
15,280 KB
testcase_13 AC 258 ms
15,124 KB
testcase_14 AC 259 ms
15,396 KB
testcase_15 AC 259 ms
15,232 KB
testcase_16 AC 281 ms
15,100 KB
testcase_17 AC 71 ms
15,008 KB
testcase_18 AC 71 ms
15,064 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:3: warning: assigned but unused variable - i
Syntax OK

ソースコード

diff #

n = gets.to_i
sum = 0
for i in 1..n
  sum += gets.to_i
end
puts sum
0