結果

問題 No.712 赤旗
ユーザー とばりとばり
提出日時 2018-12-09 03:36:05
言語 D
(dmd 2.106.1)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 361 bytes
コンパイル時間 523 ms
コンパイル使用メモリ 81,856 KB
実行使用メモリ 4,376 KB
最終ジャッジ日時 2023-09-03 21:28:30
合計ジャッジ時間 959 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import std.stdio;
import std.array;
import std.string;
import std.conv;

void main() {
    string[] input = split(readln());
    int n = to!int(input[0]),
        m = to!int(input[1]);
    
    int ans = 0;
    foreach (i; 0..n) {
        string a = chomp(readln());

        foreach (c; a) {
            if (c == 'W') ans++;
        }
    }
    writeln(ans);
}
0