結果

問題 No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
ユーザー Lo_OTLo_OT
提出日時 2017-12-31 15:14:48
言語 Ruby
(3.3.0)
結果
AC  
実行時間 293 ms / 2,000 ms
コード長 106 bytes
コンパイル時間 311 ms
コンパイル使用メモリ 11,276 KB
実行使用メモリ 47,052 KB
最終ジャッジ日時 2023-08-23 12:28:32
合計ジャッジ時間 4,166 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
15,036 KB
testcase_01 AC 77 ms
15,280 KB
testcase_02 AC 77 ms
15,048 KB
testcase_03 AC 77 ms
14,896 KB
testcase_04 AC 77 ms
15,252 KB
testcase_05 AC 77 ms
15,220 KB
testcase_06 AC 78 ms
15,036 KB
testcase_07 AC 82 ms
15,424 KB
testcase_08 AC 103 ms
18,564 KB
testcase_09 AC 127 ms
21,576 KB
testcase_10 AC 226 ms
38,480 KB
testcase_11 AC 229 ms
39,136 KB
testcase_12 AC 232 ms
39,676 KB
testcase_13 AC 236 ms
40,184 KB
testcase_14 AC 240 ms
40,736 KB
testcase_15 AC 242 ms
41,348 KB
testcase_16 AC 293 ms
47,052 KB
testcase_17 AC 77 ms
15,044 KB
testcase_18 AC 77 ms
15,216 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n = gets.to_i
input = gets.split.map(&:to_i)
sum = 0

for i in 0..n
    sum += input[i].to_i
end

puts sum
0