結果

問題 No.495 (^^*) Easy
ユーザー gemmarogemmaro
提出日時 2020-04-15 09:53:34
言語 Elixir
(1.16.2)
結果
AC  
実行時間 612 ms / 2,000 ms
コード長 232 bytes
コンパイル時間 1,244 ms
コンパイル使用メモリ 55,196 KB
実行使用メモリ 55,136 KB
最終ジャッジ日時 2023-08-30 00:12:38
合計ジャッジ時間 6,533 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 606 ms
49,968 KB
testcase_01 AC 603 ms
49,348 KB
testcase_02 AC 606 ms
49,220 KB
testcase_03 AC 598 ms
49,276 KB
testcase_04 AC 596 ms
51,116 KB
testcase_05 AC 598 ms
49,424 KB
testcase_06 AC 612 ms
55,136 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

  defp solve(s) do
    [~r/\^\*/, ~r/\*\^/]
    |> Enum.map(&(Regex.scan(&1, s) |> length))
    |> Enum.join(" ")
  end
end
0