結果

問題 No.721 Die tertia (ディエ・テルツィア)
ユーザー getty104getty104
提出日時 2018-09-11 15:57:25
言語 Elixir
(1.15.6)
結果
AC  
実行時間 722 ms / 2,000 ms
コード長 294 bytes
コンパイル時間 1,392 ms
コンパイル使用メモリ 56,108 KB
実行使用メモリ 50,396 KB
最終ジャッジ日時 2023-08-29 23:00:28
合計ジャッジ時間 18,063 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 704 ms
49,768 KB
testcase_01 AC 705 ms
49,600 KB
testcase_02 AC 695 ms
49,492 KB
testcase_03 AC 692 ms
49,524 KB
testcase_04 AC 695 ms
50,364 KB
testcase_05 AC 684 ms
50,076 KB
testcase_06 AC 708 ms
50,220 KB
testcase_07 AC 693 ms
50,316 KB
testcase_08 AC 698 ms
50,072 KB
testcase_09 AC 701 ms
49,720 KB
testcase_10 AC 707 ms
49,828 KB
testcase_11 AC 688 ms
49,804 KB
testcase_12 AC 718 ms
49,596 KB
testcase_13 AC 688 ms
50,232 KB
testcase_14 AC 722 ms
50,204 KB
testcase_15 AC 696 ms
49,612 KB
testcase_16 AC 715 ms
50,396 KB
testcase_17 AC 706 ms
49,800 KB
testcase_18 AC 695 ms
49,792 KB
testcase_19 AC 705 ms
50,232 KB
testcase_20 AC 698 ms
49,748 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

defmodule Main do
  def main do
    [year, month, day] = IO.gets("") |> String.trim |> String.split("/") |> Enum.map(&String.to_integer/1)
    {:ok, date} = Date.new(year, month, day)
    next_day = Date.add(date, 2) |> Date.to_string
    IO.puts Regex.replace(~r/-/, next_day, "/")
  end
end

0