結果

問題 No.712 赤旗
ユーザー YukimotoPGYukimotoPG
提出日時 2019-02-13 10:39:58
言語 Java21
(openjdk 21)
結果
AC  
実行時間 130 ms / 2,000 ms
コード長 360 bytes
コンパイル時間 1,936 ms
コンパイル使用メモリ 71,656 KB
実行使用メモリ 56,164 KB
最終ジャッジ日時 2023-10-11 11:07:51
合計ジャッジ時間 3,203 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,884 KB
testcase_01 AC 121 ms
55,752 KB
testcase_02 AC 123 ms
56,120 KB
testcase_03 AC 121 ms
56,164 KB
testcase_04 AC 130 ms
56,072 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		
		int h = sc.nextInt(); int w = sc.nextInt();
		int count = 0;
		for (int i=0; i<h; i++) {
			String temp = sc.next();
			for (int j=0; j<w; j++) {
				if (temp.charAt(j) == 'W') count++;
			}
		}
		System.out.println(count);
		
		
	}
}
0