結果

問題 No.965 門松列が嫌い
ユーザー penqenpenqen
提出日時 2020-12-25 00:19:31
言語 Elixir
(1.16.2)
結果
WA  
実行時間 -
コード長 252 bytes
コンパイル時間 1,101 ms
コンパイル使用メモリ 54,736 KB
実行使用メモリ 51,076 KB
最終ジャッジ日時 2023-08-30 01:14:39
合計ジャッジ時間 8,625 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 622 ms
49,884 KB
testcase_01 AC 640 ms
49,940 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 628 ms
49,396 KB
testcase_05 WA -
testcase_06 AC 624 ms
50,004 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 616 ms
49,152 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

defmodule Main do
  def main do
    [a, b, c] = IO.read(:line) |> String.trim() |> String.split(" ") |> Enum.map(&String.to_integer/1)
    solve(a, b, c) |> IO.puts()
  end

  def solve(a, b, c) do
    [b - a, b - c, abs(a - c)] |> Enum.min()
  end
end
0