結果

問題 No.1665 quotient replace
ユーザー 👑 obakyanobakyan
提出日時 2022-01-09 00:23:08
言語 Lua
(LuaJit 2.1.1696795921)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 605 bytes
コンパイル時間 350 ms
コンパイル使用メモリ 5,504 KB
実行使用メモリ 171,888 KB
最終ジャッジ日時 2024-04-26 19:40:24
合計ジャッジ時間 113,052 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2,210 ms
135,296 KB
testcase_01 AC 2,238 ms
135,168 KB
testcase_02 AC 2,234 ms
135,160 KB
testcase_03 AC 2,218 ms
135,260 KB
testcase_04 AC 2,234 ms
135,296 KB
testcase_05 AC 2,195 ms
135,264 KB
testcase_06 AC 2,271 ms
135,424 KB
testcase_07 AC 2,261 ms
135,268 KB
testcase_08 AC 2,247 ms
135,436 KB
testcase_09 AC 2,240 ms
136,448 KB
testcase_10 AC 2,502 ms
155,420 KB
testcase_11 AC 2,849 ms
168,640 KB
testcase_12 AC 2,364 ms
139,824 KB
testcase_13 TLE -
testcase_14 AC 2,953 ms
169,708 KB
testcase_15 AC 2,910 ms
169,708 KB
testcase_16 TLE -
testcase_17 TLE -
testcase_18 AC 2,262 ms
135,224 KB
testcase_19 AC 2,262 ms
135,220 KB
testcase_20 AC 2,259 ms
135,160 KB
testcase_21 AC 2,252 ms
135,156 KB
testcase_22 AC 2,293 ms
135,304 KB
testcase_23 AC 2,232 ms
135,252 KB
testcase_24 AC 2,238 ms
135,252 KB
testcase_25 AC 2,257 ms
135,264 KB
testcase_26 AC 2,251 ms
135,272 KB
testcase_27 AC 2,274 ms
135,616 KB
testcase_28 AC 2,254 ms
136,348 KB
testcase_29 AC 2,284 ms
137,852 KB
testcase_30 AC 2,436 ms
145,396 KB
testcase_31 AC 2,542 ms
149,144 KB
testcase_32 AC 2,737 ms
168,556 KB
testcase_33 AC 2,409 ms
149,536 KB
testcase_34 AC 2,621 ms
163,716 KB
testcase_35 AC 2,686 ms
161,872 KB
testcase_36 AC 2,675 ms
162,888 KB
testcase_37 AC 2,647 ms
160,912 KB
testcase_38 AC 2,683 ms
164,892 KB
testcase_39 AC 2,550 ms
157,772 KB
testcase_40 AC 2,556 ms
158,024 KB
testcase_41 AC 2,592 ms
158,024 KB
testcase_42 AC 2,251 ms
135,308 KB
testcase_43 AC 2,220 ms
135,212 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

local bxor = bit.bxor
local mce, mfl, msq, mmi, mma, mab = math.ceil, math.floor, math.sqrt, math.min, math.max, math.abs

local m = {}
local lim = 1000 * 1000
for i = 1, lim do
  m[i] = {}
end
local tt = {0}
for i = 2, lim do
  local mi = m[i]
  for j = 1, lim do
    if not mi[j] then tt[i] = j break end
  end
  local v = tt[i]
  for j = i + i, lim, i do
    m[j][v] = true
  end
end
-- print(os.clock())
-- os.exit()
local n = io.read("*n", "*l")
local ret = 0
local s = io.read()
for w in s:gmatch("%d+") do
  local a = tonumber(w)
  ret = bxor(ret, tt[a])
end
print(ret == 0 and "black" or "white")
0