結果

問題 No.1057 素敵な日
ユーザー penqenpenqen
提出日時 2020-12-16 14:00:16
言語 Elixir
(1.16.2)
結果
AC  
実行時間 574 ms / 2,000 ms
コード長 292 bytes
コンパイル時間 1,136 ms
コンパイル使用メモリ 55,296 KB
実行使用メモリ 50,060 KB
最終ジャッジ日時 2023-08-30 01:09:58
合計ジャッジ時間 7,464 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 572 ms
49,108 KB
testcase_01 AC 559 ms
49,356 KB
testcase_02 AC 563 ms
49,248 KB
testcase_03 AC 562 ms
49,800 KB
testcase_04 AC 567 ms
49,332 KB
testcase_05 AC 569 ms
49,832 KB
testcase_06 AC 569 ms
49,324 KB
testcase_07 AC 574 ms
49,444 KB
testcase_08 AC 569 ms
50,060 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([a, b]) when a == b, do: a + b - 1
  def solve([a, b]) when a < b, do: a * 2
  def solve([a, b]) when b < a, do: b * 2

end
0