結果

問題 No.547 未知の言語
ユーザー gemmarogemmaro
提出日時 2020-04-18 18:46:15
言語 Elixir
(1.16.2)
結果
AC  
実行時間 641 ms / 2,000 ms
コード長 502 bytes
コンパイル時間 1,084 ms
コンパイル使用メモリ 55,380 KB
実行使用メモリ 50,324 KB
最終ジャッジ日時 2023-08-30 00:24:17
合計ジャッジ時間 24,030 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 609 ms
49,376 KB
testcase_01 AC 623 ms
49,932 KB
testcase_02 AC 615 ms
49,908 KB
testcase_03 AC 628 ms
49,772 KB
testcase_04 AC 620 ms
49,384 KB
testcase_05 AC 640 ms
49,348 KB
testcase_06 AC 636 ms
49,256 KB
testcase_07 AC 636 ms
49,692 KB
testcase_08 AC 634 ms
49,284 KB
testcase_09 AC 630 ms
49,252 KB
testcase_10 AC 634 ms
49,760 KB
testcase_11 AC 618 ms
49,896 KB
testcase_12 AC 630 ms
49,276 KB
testcase_13 AC 625 ms
49,276 KB
testcase_14 AC 613 ms
49,324 KB
testcase_15 AC 620 ms
49,312 KB
testcase_16 AC 610 ms
50,324 KB
testcase_17 AC 620 ms
49,324 KB
testcase_18 AC 624 ms
49,336 KB
testcase_19 AC 617 ms
49,336 KB
testcase_20 AC 618 ms
49,216 KB
testcase_21 AC 614 ms
49,372 KB
testcase_22 AC 623 ms
49,180 KB
testcase_23 AC 614 ms
49,208 KB
testcase_24 AC 626 ms
49,852 KB
testcase_25 AC 624 ms
49,288 KB
testcase_26 AC 622 ms
49,936 KB
testcase_27 AC 636 ms
49,952 KB
testcase_28 AC 625 ms
49,844 KB
testcase_29 AC 641 ms
50,104 KB
testcase_30 AC 622 ms
49,168 KB
testcase_31 AC 626 ms
49,504 KB
testcase_32 AC 622 ms
49,244 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

defmodule Main do
  def main do
    1..3
    |> Enum.map(fn _ -> IO.read(:line) |> String.trim() end)
    |> solve
    |> IO.puts()
  end

  def solve([n, x, y]) do
    s = x |> String.split()
    t = y |> String.split()

    0..((n |> String.to_integer()) - 1)
    |> Enum.reject(fn i -> s |> Enum.at(i) == t |> Enum.at(i) end)
    |> Enum.map(fn j ->
      """
      #{j + 1}
      #{s |> Enum.at(j)}
      #{t |> Enum.at(j)}
      """
      |> String.trim()
    end)
    |> Enum.join("\n")
  end
end
0