結果

問題 No.712 赤旗
ユーザー Mcpu3
提出日時 2018-10-10 21:00:48
言語 Java
(openjdk 23)
結果
AC  
実行時間 140 ms / 2,000 ms
コード長 406 bytes
コンパイル時間 2,213 ms
コンパイル使用メモリ 74,304 KB
実行使用メモリ 41,564 KB
最終ジャッジ日時 2024-10-12 17:21:00
合計ジャッジ時間 3,336 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt(), M = sc.nextInt(), ans = 0;
		char A[][] = new char[N][M + 1];
		for (int i = 0; i < N; ++i) {
			A[i] = sc.next().toCharArray();
			for (int j = 0; j < M; ++j) {
				if (A[i][j] == 'W') ++ans;
			}
		}
		sc.close();
		System.out.print(ans);
	}
}
0