結果

問題 No.2451 Redistribute Integers
ユーザー 👑 obakyanobakyan
提出日時 2023-09-14 22:35:47
言語 Lua
(LuaJit 2.1.1696795921)
結果
AC  
実行時間 410 ms / 2,000 ms
コード長 186 bytes
コンパイル時間 156 ms
コンパイル使用メモリ 5,328 KB
実行使用メモリ 6,720 KB
最終ジャッジ日時 2023-09-14 22:35:54
合計ジャッジ時間 6,998 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 337 ms
6,368 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 1 ms
4,380 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 290 ms
6,556 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 1 ms
4,380 KB
testcase_11 AC 1 ms
4,376 KB
testcase_12 AC 122 ms
4,492 KB
testcase_13 AC 377 ms
6,448 KB
testcase_14 AC 362 ms
6,360 KB
testcase_15 AC 180 ms
4,376 KB
testcase_16 AC 168 ms
4,520 KB
testcase_17 AC 302 ms
6,536 KB
testcase_18 AC 346 ms
6,368 KB
testcase_19 AC 26 ms
4,376 KB
testcase_20 AC 303 ms
6,544 KB
testcase_21 AC 410 ms
6,720 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = io.read("*n")
a = {}
for i = 1, n do a[i] = io.read("*n") end
table.sort(a)
for i = 1, n - 1 do
  if (a[i + 1] - a[i]) % n ~= 0 then
    print("No") os.exit()
  end
end
print("Yes")
0