結果

問題 No.495 (^^*) Easy
ユーザー matsuyoshi30matsuyoshi30
提出日時 2018-05-02 00:15:53
言語 Java21
(openjdk 21)
結果
AC  
実行時間 235 ms / 2,000 ms
コード長 446 bytes
コンパイル時間 2,239 ms
コンパイル使用メモリ 73,632 KB
実行使用メモリ 58,368 KB
最終ジャッジ日時 2023-09-10 08:49:28
合計ジャッジ時間 4,160 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 148 ms
56,844 KB
testcase_01 AC 149 ms
56,764 KB
testcase_02 AC 147 ms
56,812 KB
testcase_03 AC 150 ms
56,508 KB
testcase_04 AC 150 ms
56,604 KB
testcase_05 AC 161 ms
56,584 KB
testcase_06 AC 235 ms
58,368 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String s = in.next();

        int right = 0;
        int left = 0;
        if(s.length() != 1) {
            for(int i = 0; i < s.length() - 5; i += 5) {
                if(s.charAt(i+3) == '*') left++;
                else right++;
            }
        }

        System.out.println(left + " " + right);
    }
}
0