結果

問題 No.32 貯金箱の憂鬱
ユーザー gemmarogemmaro
提出日時 2020-04-18 21:24:48
言語 Elixir
(1.16.2)
結果
AC  
実行時間 646 ms / 5,000 ms
コード長 294 bytes
コンパイル時間 1,308 ms
コンパイル使用メモリ 55,168 KB
実行使用メモリ 50,164 KB
最終ジャッジ日時 2023-08-30 00:26:21
合計ジャッジ時間 10,443 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 642 ms
50,164 KB
testcase_01 AC 645 ms
49,224 KB
testcase_02 AC 629 ms
49,704 KB
testcase_03 AC 638 ms
49,468 KB
testcase_04 AC 646 ms
49,448 KB
testcase_05 AC 646 ms
49,332 KB
testcase_06 AC 646 ms
49,248 KB
testcase_07 AC 629 ms
49,268 KB
testcase_08 AC 626 ms
49,792 KB
testcase_09 AC 636 ms
49,756 KB
testcase_10 AC 635 ms
49,272 KB
testcase_11 AC 635 ms
49,264 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

  def solve([l, m, n]) do
    x = m + (n |> div(25))
    ((l + (x |> div(4))) |> rem(10)) + (x |> rem(4)) + (n |> rem(25))
  end
end
0