結果

問題 No.279 木の数え上げ
ユーザー gemmarogemmaro
提出日時 2020-04-14 10:51:49
言語 Elixir
(1.16.2)
結果
MLE  
実行時間 -
コード長 285 bytes
コンパイル時間 991 ms
コンパイル使用メモリ 54,588 KB
実行使用メモリ 125,584 KB
最終ジャッジ日時 2023-08-30 00:12:11
合計ジャッジ時間 16,485 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 618 ms
50,244 KB
testcase_01 AC 622 ms
49,820 KB
testcase_02 AC 616 ms
49,528 KB
testcase_03 AC 623 ms
49,192 KB
testcase_04 AC 619 ms
49,700 KB
testcase_05 AC 622 ms
50,356 KB
testcase_06 AC 621 ms
49,732 KB
testcase_07 AC 617 ms
49,848 KB
testcase_08 AC 616 ms
49,744 KB
testcase_09 AC 618 ms
50,112 KB
testcase_10 MLE -
testcase_11 AC 636 ms
56,592 KB
testcase_12 MLE -
testcase_13 AC 627 ms
52,452 KB
testcase_14 MLE -
testcase_15 MLE -
testcase_16 MLE -
testcase_17 MLE -
testcase_18 MLE -
testcase_19 MLE -
testcase_20 MLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

  defp solve(s) do
    [
      Enum.count(s, &(&1 == ?t)),
      Enum.count(s, &(&1 == ?r)),
      Enum.count(s, &(&1 == ?e)) |> div(2)
    ]
    |> Enum.min()
  end
end
0