結果

問題 No.369 足し間違い
ユーザー nobigomunobigomu
提出日時 2018-03-07 23:59:52
言語 Lua
(LuaJit 2.1.1696795921)
結果
AC  
実行時間 4 ms / 2,000 ms
コード長 155 bytes
コンパイル時間 52 ms
コンパイル使用メモリ 6,684 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-15 07:01:21
合計ジャッジ時間 588 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
6,812 KB
testcase_01 AC 1 ms
6,940 KB
testcase_02 AC 1 ms
6,940 KB
testcase_03 AC 1 ms
6,944 KB
testcase_04 AC 4 ms
6,944 KB
testcase_05 AC 2 ms
6,940 KB
testcase_06 AC 3 ms
6,940 KB
testcase_07 AC 4 ms
6,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

function sum(n, acc)
	if n > 0 then return sum(n-1, acc+io.stdin:read("*n")) end
	return acc
end

print(sum(io.stdin:read("*n"), 0) - io.stdin:read("*n"))
0