結果
問題 | No.712 赤旗 |
ユーザー |
|
提出日時 | 2020-08-20 15:54:45 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 165 ms / 2,000 ms |
コード長 | 604 bytes |
コンパイル時間 | 2,368 ms |
コンパイル使用メモリ | 76,340 KB |
実行使用メモリ | 54,060 KB |
最終ジャッジ日時 | 2024-10-13 12:05:22 |
合計ジャッジ時間 | 3,556 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 |
ソースコード
import java.util.*;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.nextLine();String[] arr = L.split("");for(int j=0; j<arr.length; j++){if(arr[j].equals("R")){count++;}}}System.out.println(total - count);}}