結果

問題 No.1128 Wedding Ceremony
ユーザー penqenpenqen
提出日時 2020-12-16 12:24:55
言語 Elixir
(1.16.2)
結果
AC  
実行時間 623 ms / 2,000 ms
コード長 228 bytes
コンパイル時間 1,012 ms
コンパイル使用メモリ 54,812 KB
実行使用メモリ 50,476 KB
最終ジャッジ日時 2023-08-30 01:06:28
合計ジャッジ時間 17,076 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 623 ms
49,332 KB
testcase_01 AC 600 ms
50,056 KB
testcase_02 AC 607 ms
50,008 KB
testcase_03 AC 616 ms
49,184 KB
testcase_04 AC 612 ms
49,240 KB
testcase_05 AC 602 ms
49,236 KB
testcase_06 AC 618 ms
49,564 KB
testcase_07 AC 606 ms
49,848 KB
testcase_08 AC 614 ms
49,368 KB
testcase_09 AC 603 ms
49,300 KB
testcase_10 AC 610 ms
49,352 KB
testcase_11 AC 610 ms
49,292 KB
testcase_12 AC 613 ms
49,816 KB
testcase_13 AC 616 ms
49,500 KB
testcase_14 AC 607 ms
49,112 KB
testcase_15 AC 605 ms
49,396 KB
testcase_16 AC 608 ms
49,192 KB
testcase_17 AC 617 ms
49,364 KB
testcase_18 AC 613 ms
49,392 KB
testcase_19 AC 618 ms
50,476 KB
testcase_20 AC 615 ms
50,336 KB
testcase_21 AC 605 ms
49,868 KB
testcase_22 AC 620 ms
50,160 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

defmodule Main do
  
  def main do
    IO.read(:line) |> String.trim() |> String.to_integer() |> solve() |> IO.puts()
  end

  def solve(n) when 0 <= n and n <= 100_000_000 do
    if rem(n, 2) == 0, do: n + 1, else: n
  end

end
0