結果
問題 |
No.712 赤旗
|
ユーザー |
|
提出日時 | 2020-08-20 16:12:32 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 122 ms / 2,000 ms |
コード長 | 591 bytes |
コンパイル時間 | 2,110 ms |
コンパイル使用メモリ | 76,320 KB |
実行使用メモリ | 41,428 KB |
最終ジャッジ日時 | 2024-10-13 12:32:53 |
合計ジャッジ時間 | 3,254 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 |
ソースコード
import java.util.*; // yukicoder No.712 赤旗 public class Main { public static void main(String[] args) throws Exception { Scanner in = new Scanner(System.in); int N = in.nextInt(); int M = in.nextInt(); final int total = N * M; int count = 0; for(int i=0; i<N; i++){ String L = in.next(); char[] arr = L.toCharArray(); for(char c : arr){ if(c == 'W') { count++; } } } System.out.println(count); } }