結果

問題 No.712 赤旗
ユーザー 37zigen37zigen
提出日時 2018-07-13 22:38:47
言語 Java19
(openjdk 21)
結果
AC  
実行時間 134 ms / 2,000 ms
コード長 388 bytes
コンパイル時間 3,306 ms
コンパイル使用メモリ 71,192 KB
実行使用メモリ 55,848 KB
最終ジャッジ日時 2023-07-30 09:48:24
合計ジャッジ時間 3,482 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
55,452 KB
testcase_01 AC 127 ms
55,744 KB
testcase_02 AC 126 ms
55,848 KB
testcase_03 AC 124 ms
55,568 KB
testcase_04 AC 134 ms
55,520 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