結果

問題 No.410 出会い
ユーザー gemmarogemmaro
提出日時 2020-04-15 10:27:26
言語 Elixir
(1.16.2)
結果
AC  
実行時間 643 ms / 2,000 ms
コード長 293 bytes
コンパイル時間 1,101 ms
コンパイル使用メモリ 55,320 KB
実行使用メモリ 49,904 KB
最終ジャッジ日時 2023-08-30 00:13:54
合計ジャッジ時間 17,133 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 626 ms
49,308 KB
testcase_01 AC 620 ms
49,444 KB
testcase_02 AC 606 ms
49,884 KB
testcase_03 AC 602 ms
49,420 KB
testcase_04 AC 594 ms
49,176 KB
testcase_05 AC 586 ms
49,116 KB
testcase_06 AC 602 ms
49,904 KB
testcase_07 AC 610 ms
49,880 KB
testcase_08 AC 624 ms
49,076 KB
testcase_09 AC 616 ms
49,184 KB
testcase_10 AC 621 ms
49,180 KB
testcase_11 AC 608 ms
49,400 KB
testcase_12 AC 593 ms
49,072 KB
testcase_13 AC 590 ms
49,216 KB
testcase_14 AC 603 ms
49,836 KB
testcase_15 AC 593 ms
49,272 KB
testcase_16 AC 614 ms
49,188 KB
testcase_17 AC 643 ms
49,176 KB
testcase_18 AC 630 ms
49,192 KB
testcase_19 AC 608 ms
49,292 KB
testcase_20 AC 603 ms
49,304 KB
testcase_21 AC 617 ms
49,792 KB
testcase_22 AC 626 ms
49,196 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

  defp solve([[px, py], [qx, qy]]) do
    (((px - qx) |> abs) + ((py - qy) |> abs)) / 2
  end
end
0