結果

問題 No.780 オフ会
ユーザー gemmarogemmaro
提出日時 2020-04-14 08:30:27
言語 Elixir
(1.16.2)
結果
AC  
実行時間 621 ms / 2,000 ms
コード長 345 bytes
コンパイル時間 986 ms
コンパイル使用メモリ 55,684 KB
実行使用メモリ 50,200 KB
最終ジャッジ日時 2023-08-30 00:11:01
合計ジャッジ時間 16,811 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 605 ms
49,724 KB
testcase_01 AC 607 ms
50,200 KB
testcase_02 AC 608 ms
49,416 KB
testcase_03 AC 605 ms
49,832 KB
testcase_04 AC 618 ms
49,328 KB
testcase_05 AC 618 ms
49,276 KB
testcase_06 AC 617 ms
49,396 KB
testcase_07 AC 609 ms
50,024 KB
testcase_08 AC 607 ms
49,100 KB
testcase_09 AC 608 ms
49,848 KB
testcase_10 AC 611 ms
49,344 KB
testcase_11 AC 613 ms
49,184 KB
testcase_12 AC 621 ms
49,968 KB
testcase_13 AC 615 ms
49,748 KB
testcase_14 AC 609 ms
49,184 KB
testcase_15 AC 599 ms
49,256 KB
testcase_16 AC 613 ms
50,124 KB
testcase_17 AC 606 ms
49,952 KB
testcase_18 AC 609 ms
49,344 KB
testcase_19 AC 620 ms
49,232 KB
testcase_20 AC 617 ms
49,260 KB
testcase_21 AC 614 ms
49,820 KB
testcase_22 AC 609 ms
50,004 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

  defp solve([a, b]) do
    yes_or_no =
      cond do
        a >= b -> "NO"
        true -> "YES"
      end

    """
    #{yes_or_no}
    #{(a - b + 1) |> abs}
    """
    |> String.trim
  end
end
0