結果

問題 No.128 お年玉(1)
ユーザー 3qvwn3qvwn
提出日時 2019-07-06 00:14:42
言語 Elixir
(1.16.2)
結果
AC  
実行時間 623 ms / 5,000 ms
コード長 313 bytes
コンパイル時間 1,020 ms
コンパイル使用メモリ 55,448 KB
実行使用メモリ 50,396 KB
最終ジャッジ日時 2023-08-29 23:43:08
合計ジャッジ時間 17,552 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 616 ms
49,924 KB
testcase_01 AC 619 ms
49,596 KB
testcase_02 AC 623 ms
49,820 KB
testcase_03 AC 619 ms
49,408 KB
testcase_04 AC 621 ms
49,348 KB
testcase_05 AC 616 ms
49,816 KB
testcase_06 AC 613 ms
49,372 KB
testcase_07 AC 620 ms
49,356 KB
testcase_08 AC 615 ms
49,912 KB
testcase_09 AC 615 ms
49,480 KB
testcase_10 AC 610 ms
49,696 KB
testcase_11 AC 613 ms
50,232 KB
testcase_12 AC 613 ms
49,456 KB
testcase_13 AC 610 ms
49,960 KB
testcase_14 AC 607 ms
49,376 KB
testcase_15 AC 617 ms
49,772 KB
testcase_16 AC 617 ms
49,800 KB
testcase_17 AC 621 ms
49,524 KB
testcase_18 AC 609 ms
49,976 KB
testcase_19 AC 618 ms
50,396 KB
testcase_20 AC 609 ms
49,280 KB
testcase_21 AC 605 ms
49,208 KB
testcase_22 AC 614 ms
49,372 KB
testcase_23 AC 618 ms
49,156 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

defmodule Main do 
  def main do 
    n = IO.gets("") |> String.trim |> String.to_integer
    IO.gets("") |> String.trim |> String.to_integer |> new_year_eve(n) |> IO.puts
  end
  
  def new_year_eve(m,n) do
    div(n,m) |> Integer.digits |> Enum.slice(0..-4) |> Enum.concat([0,0,0]) |> Integer.undigits
  end
end
0