結果
問題 | No.1957 Xor Min |
ユーザー |
👑 |
提出日時 | 2022-06-05 11:01:39 |
言語 | Lua (LuaJit 2.1.1734355927) |
結果 |
WA
|
実行時間 | - |
コード長 | 348 bytes |
コンパイル時間 | 250 ms |
コンパイル使用メモリ | 7,072 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-21 04:08:06 |
合計ジャッジ時間 | 1,261 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 23 WA * 2 |
ソースコード
local a, b = io.read("*n", "*n") if b < a then a, b = b, a end local c, d = 0, 0 z = a while 0 < z do c = c + 1 z = math.floor(z / 2) end z = b while 0 < z do d = d + 1 z = math.floor(z / 2) end if c < d then print(a) else local mul = 1 while true do if a < mul * 2 - 1 then break end mul = mul * 2 end print(mul - 1) end