結果
問題 | No.1665 quotient replace |
ユーザー |
👑 |
提出日時 | 2022-01-09 00:23:08 |
言語 | Lua (LuaJit 2.1.1734355927) |
結果 |
TLE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 605 bytes |
コンパイル時間 | 60 ms |
コンパイル使用メモリ | 6,948 KB |
実行使用メモリ | 172,496 KB |
最終ジャッジ日時 | 2024-11-14 10:04:25 |
合計ジャッジ時間 | 112,478 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 37 TLE * 4 |
ソースコード
local bxor = bit.bxorlocal mce, mfl, msq, mmi, mma, mab = math.ceil, math.floor, math.sqrt, math.min, math.max, math.abslocal m = {}local lim = 1000 * 1000for i = 1, lim dom[i] = {}endlocal tt = {0}for i = 2, lim dolocal mi = m[i]for j = 1, lim doif not mi[j] then tt[i] = j break endendlocal v = tt[i]for j = i + i, lim, i dom[j][v] = trueendend-- print(os.clock())-- os.exit()local n = io.read("*n", "*l")local ret = 0local s = io.read()for w in s:gmatch("%d+") dolocal a = tonumber(w)ret = bxor(ret, tt[a])endprint(ret == 0 and "black" or "white")