結果

問題 No.975 ミスターマックスバリュ
ユーザー gemmarogemmaro
提出日時 2020-04-19 15:57:06
言語 Elixir
(1.16.2)
結果
AC  
実行時間 586 ms / 2,000 ms
コード長 396 bytes
コンパイル時間 984 ms
コンパイル使用メモリ 54,752 KB
実行使用メモリ 59,944 KB
最終ジャッジ日時 2023-08-30 00:31:33
合計ジャッジ時間 8,725 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 566 ms
49,348 KB
testcase_01 AC 559 ms
49,332 KB
testcase_02 AC 586 ms
49,888 KB
testcase_03 AC 558 ms
49,348 KB
testcase_04 AC 560 ms
49,452 KB
testcase_05 AC 562 ms
49,112 KB
testcase_06 AC 569 ms
49,780 KB
testcase_07 AC 560 ms
49,876 KB
testcase_08 AC 579 ms
59,944 KB
testcase_09 AC 553 ms
49,648 KB
testcase_10 AC 564 ms
49,368 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

  def solve([[x | _], a, b]) do
    n = x in a
    v = x in b

    cond do
      n && v -> "MrMaxValu"
      n -> "MrMax"
      v -> "MaxValu"
      true -> -1
    end
  end
end
0