結果

問題 No.85 TVザッピング(1)
ユーザー gemmarogemmaro
提出日時 2020-05-15 08:26:02
言語 Elixir
(1.16.2)
結果
WA  
実行時間 -
コード長 407 bytes
コンパイル時間 1,176 ms
コンパイル使用メモリ 54,596 KB
実行使用メモリ 50,724 KB
最終ジャッジ日時 2023-08-30 00:49:34
合計ジャッジ時間 22,335 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 629 ms
49,056 KB
testcase_01 AC 637 ms
49,612 KB
testcase_02 AC 628 ms
49,132 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 616 ms
49,140 KB
testcase_10 AC 623 ms
50,284 KB
testcase_11 AC 632 ms
49,720 KB
testcase_12 AC 626 ms
49,784 KB
testcase_13 AC 633 ms
50,012 KB
testcase_14 AC 642 ms
49,164 KB
testcase_15 AC 630 ms
49,788 KB
testcase_16 AC 635 ms
49,876 KB
testcase_17 AC 632 ms
49,056 KB
testcase_18 AC 635 ms
49,136 KB
testcase_19 AC 627 ms
49,728 KB
testcase_20 AC 624 ms
50,156 KB
testcase_21 AC 632 ms
49,236 KB
testcase_22 AC 632 ms
49,860 KB
testcase_23 AC 634 ms
49,056 KB
testcase_24 AC 638 ms
49,236 KB
testcase_25 AC 635 ms
49,192 KB
testcase_26 AC 635 ms
49,920 KB
testcase_27 AC 646 ms
49,332 KB
testcase_28 AC 641 ms
49,040 KB
testcase_29 AC 636 ms
49,852 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

  def solve([n, m, _c]) do
    case [n, m] |> Enum.sort() do
      [1, 2] ->
        "YES"

      [1, _] ->
        "NO"

      _ ->
        cond do
          n |> rem(2) == 0 -> "YES"
          :else -> "NO"
        end
    end
  end
end
0