結果
問題 | No.712 赤旗 |
ユーザー | wotsushi |
提出日時 | 2018-07-22 23:25:07 |
言語 | Elixir (1.16.2) |
結果 |
AC
|
実行時間 | 590 ms / 2,000 ms |
コード長 | 390 bytes |
コンパイル時間 | 1,031 ms |
コンパイル使用メモリ | 54,976 KB |
実行使用メモリ | 50,224 KB |
最終ジャッジ日時 | 2023-08-29 22:45:37 |
合計ジャッジ時間 | 5,102 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 586 ms
50,224 KB |
testcase_01 | AC | 586 ms
49,252 KB |
testcase_02 | AC | 590 ms
49,360 KB |
testcase_03 | AC | 587 ms
49,168 KB |
testcase_04 | AC | 577 ms
49,968 KB |
コンパイルメッセージ
warning: variable "m" is unused (if the variable is not meant to be used, prefix it with an underscore) Main.exs:3: Main.main/0
ソースコード
defmodule Main do def main do [n, m] = IO.gets("") |> String.trim |> String.split |> Enum.map(&String.to_integer/1) a = for _ <- 1..n, do: IO.gets("") |> String.trim ans = a |> Enum.flat_map(&String.graphemes/1) |> Enum.map(&( case &1 do "W" -> 1 _ -> 0 end )) |> Enum.sum IO.puts ans end end