結果

問題 No.712 赤旗
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2019-02-19 17:32:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 132 ms / 2,000 ms
コード長 482 bytes
コンパイル時間 2,596 ms
コンパイル使用メモリ 75,296 KB
実行使用メモリ 54,212 KB
最終ジャッジ日時 2024-04-20 14:43:45
合計ジャッジ時間 3,141 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
54,212 KB
testcase_01 AC 114 ms
52,760 KB
testcase_02 AC 124 ms
54,176 KB
testcase_03 AC 124 ms
54,064 KB
testcase_04 AC 132 ms
53,972 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int ans = 0;
        for(int i=0; i<n; i++) {
            String tmp = sc.next();
            for(int j=0; j<tmp.length(); j++) {
                if(tmp.charAt(j) != 'R') {
                    ans++;
                }
            }
        }
        System.out.println(ans);
    }
}
0