結果
問題 | No.712 赤旗 |
ユーザー | Pump0129 |
提出日時 | 2018-11-28 00:50:04 |
言語 | Java21 (openjdk 21) |
結果 |
AC
|
実行時間 | 128 ms / 2,000 ms |
コード長 | 578 bytes |
コンパイル時間 | 3,783 ms |
コンパイル使用メモリ | 70,856 KB |
実行使用メモリ | 55,876 KB |
最終ジャッジ日時 | 2023-09-07 03:07:01 |
合計ジャッジ時間 | 5,264 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 120 ms
55,864 KB |
testcase_01 | AC | 122 ms
55,572 KB |
testcase_02 | AC | 121 ms
55,672 KB |
testcase_03 | AC | 127 ms
55,876 KB |
testcase_04 | AC | 128 ms
55,560 KB |
ソースコード
package net.ipipip0129.yukicoder.No712; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int height = scan.nextInt(); int width = scan.nextInt(); int ans_cnt = 0; scan.nextLine(); for (int i = 0; i < height; i++) { String line = scan.nextLine(); for (char s : line.toCharArray()) { if (s == 'W') ans_cnt += 1; } } System.out.println(ans_cnt); } }