結果

問題 No.693 square1001 and Permutation 2
ユーザー nobigomunobigomu
提出日時 2018-06-08 22:31:20
言語 Lua
(LuaJit 2.1.1696795921)
結果
WA  
実行時間 -
コード長 170 bytes
コンパイル時間 333 ms
コンパイル使用メモリ 5,076 KB
実行使用メモリ 5,060 KB
最終ジャッジ日時 2023-09-12 23:57:04
合計ジャッジ時間 971 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,384 KB
testcase_02 WA -
testcase_03 AC 1 ms
4,380 KB
testcase_04 WA -
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 1 ms
4,384 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 WA -
testcase_09 AC 1 ms
4,380 KB
testcase_10 AC 1 ms
4,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

print((function (n, s)
	local a=n*(n+1)/2
	local b=0 for e in s:gmatch("%d+") do b=b+tonumber(e) end
	return math.abs(a-b)
end)(io.stdin:read("*l"), io.stdin:read("*l")))
0