結果

問題 No.780 オフ会
ユーザー nao22bnao22b
提出日時 2019-04-14 14:37:49
言語 Elixir
(1.16.2)
結果
AC  
実行時間 650 ms / 2,000 ms
コード長 345 bytes
コンパイル時間 1,111 ms
コンパイル使用メモリ 55,400 KB
実行使用メモリ 50,140 KB
最終ジャッジ日時 2023-08-29 23:19:17
合計ジャッジ時間 17,380 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 646 ms
49,176 KB
testcase_01 AC 640 ms
49,340 KB
testcase_02 AC 650 ms
49,252 KB
testcase_03 AC 643 ms
50,108 KB
testcase_04 AC 646 ms
49,736 KB
testcase_05 AC 630 ms
49,316 KB
testcase_06 AC 630 ms
49,260 KB
testcase_07 AC 641 ms
49,764 KB
testcase_08 AC 632 ms
49,200 KB
testcase_09 AC 633 ms
49,208 KB
testcase_10 AC 634 ms
49,336 KB
testcase_11 AC 635 ms
49,404 KB
testcase_12 AC 635 ms
49,636 KB
testcase_13 AC 629 ms
50,140 KB
testcase_14 AC 639 ms
49,896 KB
testcase_15 AC 636 ms
49,228 KB
testcase_16 AC 627 ms
49,360 KB
testcase_17 AC 635 ms
49,348 KB
testcase_18 AC 643 ms
49,356 KB
testcase_19 AC 637 ms
50,116 KB
testcase_20 AC 625 ms
49,252 KB
testcase_21 AC 633 ms
49,368 KB
testcase_22 AC 633 ms
49,852 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

defmodule Main do

    def can_pair_txt(a, b) when a < b, do: "YES"
    def can_pair_txt(_, _), do: "NO"

    def remain_num(a, b), do: abs((a + 1) - b)

    def main do
        [a, b] = IO.gets("") |> String.trim |> String.split |> Enum.map(&String.to_integer/1)
        IO.puts can_pair_txt(a, b)
        IO.puts remain_num(a, b)
    end
end

0