結果

問題 No.56 消費税
ユーザー gemmarogemmaro
提出日時 2020-04-10 07:42:00
言語 Elixir
(1.16.2)
結果
AC  
実行時間 632 ms / 5,000 ms
コード長 276 bytes
コンパイル時間 1,126 ms
コンパイル使用メモリ 54,700 KB
実行使用メモリ 51,020 KB
最終ジャッジ日時 2023-08-30 00:04:53
合計ジャッジ時間 19,717 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 612 ms
49,408 KB
testcase_01 AC 605 ms
49,504 KB
testcase_02 AC 615 ms
49,340 KB
testcase_03 AC 616 ms
49,276 KB
testcase_04 AC 614 ms
50,096 KB
testcase_05 AC 617 ms
49,504 KB
testcase_06 AC 623 ms
50,040 KB
testcase_07 AC 619 ms
49,908 KB
testcase_08 AC 621 ms
49,960 KB
testcase_09 AC 625 ms
49,764 KB
testcase_10 AC 619 ms
49,268 KB
testcase_11 AC 621 ms
49,520 KB
testcase_12 AC 619 ms
49,392 KB
testcase_13 AC 622 ms
49,332 KB
testcase_14 AC 620 ms
50,008 KB
testcase_15 AC 630 ms
49,352 KB
testcase_16 AC 610 ms
51,020 KB
testcase_17 AC 613 ms
49,436 KB
testcase_18 AC 632 ms
49,336 KB
testcase_19 AC 623 ms
49,396 KB
testcase_20 AC 628 ms
49,856 KB
testcase_21 AC 622 ms
49,692 KB
testcase_22 AC 613 ms
49,344 KB
testcase_23 AC 625 ms
49,268 KB
testcase_24 AC 622 ms
49,836 KB
testcase_25 AC 624 ms
49,216 KB
testcase_26 AC 621 ms
49,320 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

defmodule Main do
  def main do
    IO.gets("")
    |> String.trim()
    |> String.split()
    |> Enum.map(&String.to_integer(&1))
    |> (fn [d, tax] ->
          (d * (100 + tax) / 100)
          |> Float.floor()
          |> trunc
        end).()
    |> IO.puts()
  end
end
0