結果

問題 No.712 赤旗
ユーザー 37zigen37zigen
提出日時 2018-07-13 22:38:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 130 ms / 2,000 ms
コード長 388 bytes
コンパイル時間 1,983 ms
コンパイル使用メモリ 74,876 KB
実行使用メモリ 41,496 KB
最終ジャッジ日時 2024-04-17 11:14:23
合計ジャッジ時間 3,167 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
41,172 KB
testcase_01 AC 128 ms
41,496 KB
testcase_02 AC 126 ms
41,192 KB
testcase_03 AC 115 ms
40,056 KB
testcase_04 AC 129 ms
41,188 KB
権限があれば一括ダウンロードができます

ソースコード

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