結果

問題 No.331 CodeRunnerでやれ
コンテスト
ユーザー obakyan
提出日時 2020-05-05 15:39:23
言語 Lua
(LuaJit 2.1.1774638290)
コンパイル:
luajit -b _filename_ a.out
実行:
luajit _filename_
結果
TLE  
実行時間 -
コード長 516 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 32 ms
コンパイル使用メモリ 6,144 KB
実行使用メモリ 85,640 KB
平均クエリ数 0.06
最終ジャッジ日時 2026-03-31 20:55:56
合計ジャッジ時間 8,680 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample TLE * 1
other AC * 1 -- * 15
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

local isend = "Merry Christmas!"
local function query(str)
  io.write(str .. "\n")
  io.flush()
  local ret = io.read("*l")
  if ret == isend then os.exit() end
  return ret
end
local s = io.read()
while s == "0" do
  s = query("L")
end
while s ~= "0" do
  s = query("F")
end
while true do
  if s == "0" then
    while s == "0" do
      s = query("R")
    end
    s = query("F")
  else
    s = query("L")
    if s == "0" then
      s = query("R")
      s = query("F")
    else
      s = query("F")
    end
  end
end
0