結果

問題 No.712 赤旗
ユーザー 37zigen
提出日時 2018-07-13 22:38:47
言語 Java
(openjdk 23)
結果
AC  
実行時間 140 ms / 2,000 ms
コード長 388 bytes
コンパイル時間 3,716 ms
コンパイル使用メモリ 74,616 KB
実行使用メモリ 55,788 KB
最終ジャッジ日時 2024-10-09 05:19:59
合計ジャッジ時間 3,287 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		new Main().run();
	}

	void run() {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int M = sc.nextInt();
		int ans = 0;
		for (int i = 0; i < N; ++i) {
			char[] c = sc.next().toCharArray();
			for (char cs : c) {
				if (cs == 'W')
					++ans;
			}
		}
		System.out.println(ans);
	}

}
0