結果

問題 No.1026 OGAWA's New Keyboard
ユーザー gemmarogemmaro
提出日時 2020-04-21 09:25:10
言語 Elixir
(1.16.2)
結果
RE  
実行時間 -
コード長 468 bytes
コンパイル時間 1,166 ms
コンパイル使用メモリ 54,988 KB
実行使用メモリ 90,788 KB
最終ジャッジ日時 2023-08-30 00:33:27
合計ジャッジ時間 8,534 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 TLE -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

defmodule Main do
  def main do
    1..(IO.read(:line)
        |> String.trim()
        |> String.to_integer())
    |> Enum.map(fn _ ->
      IO.read(:line)
      |> String.trim()
      |> String.split()
    end)
    |> solve_rec([])
    |> IO.puts()
  end

  def solve_rec([], r) do
    r |> Enum.join()
  end

  def solve_rec([{t, s} | l], r) do
    case t do
      "0" -> solve_rec(l, r |> List.insert_at(-1, s))
      "1" -> solve_rec(l, [s | r])
    end
  end
end
0