結果

問題 No.712 赤旗
ユーザー ut96ut96
提出日時 2018-07-23 11:47:51
言語 Elixir
(1.16.2)
結果
AC  
実行時間 650 ms / 2,000 ms
コード長 308 bytes
コンパイル時間 1,121 ms
コンパイル使用メモリ 54,752 KB
実行使用メモリ 49,948 KB
最終ジャッジ日時 2023-08-29 22:46:37
合計ジャッジ時間 5,396 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 637 ms
49,948 KB
testcase_01 AC 637 ms
49,248 KB
testcase_02 AC 648 ms
49,724 KB
testcase_03 AC 642 ms
49,252 KB
testcase_04 AC 650 ms
49,900 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

defmodule Main do
  def main do
    [n, m] = IO.gets("") |> String.trim |> String.split |> Enum.map(&String.to_integer/1)
    ans = for _ <- 1..n do
      IO.gets("")
      |> String.slice(0..m-1)
      |> String.to_charlist
      |> Enum.count(&(&1 === ?W))
    end
    |> Enum.sum
    IO.puts ans
  end
end
0