結果

問題 No.712 赤旗
ユーザー YamaKasaYamaKasa
提出日時 2018-07-14 00:15:25
言語 Java
(openjdk 23)
結果
AC  
実行時間 138 ms / 2,000 ms
コード長 407 bytes
コンパイル時間 2,634 ms
コンパイル使用メモリ 73,956 KB
実行使用メモリ 41,236 KB
最終ジャッジ日時 2024-10-09 05:49:44
合計ジャッジ時間 4,042 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int M = scan.nextInt();
		int cnt = 0;
		for(int i = 0; i < N; i++) {
			String s = scan.next();
			for(int j = 0; j < M; j++) {
				char c = s.charAt(j);
				if(c == 'W') {
					cnt ++;
				}
			}
		}
		scan.close();
		System.out.println(cnt);
	}
}
0