結果

問題 No.712 赤旗
ユーザー yukiyuki
提出日時 2020-08-20 15:54:45
言語 Java21
(openjdk 21)
結果
AC  
実行時間 170 ms / 2,000 ms
コード長 604 bytes
コンパイル時間 2,277 ms
コンパイル使用メモリ 74,700 KB
実行使用メモリ 41,876 KB
最終ジャッジ日時 2024-04-21 13:28:37
合計ジャッジ時間 3,644 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
41,028 KB
testcase_01 AC 131 ms
41,220 KB
testcase_02 AC 135 ms
41,280 KB
testcase_03 AC 136 ms
41,372 KB
testcase_04 AC 170 ms
41,876 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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);

    }
}
0