結果

問題 No.495 (^^*) Easy
ユーザー YOSHIYOSHI
提出日時 2021-03-17 21:27:17
言語 Java21
(openjdk 21)
結果
AC  
実行時間 133 ms / 2,000 ms
コード長 485 bytes
コンパイル時間 3,419 ms
コンパイル使用メモリ 75,224 KB
実行使用メモリ 53,572 KB
最終ジャッジ日時 2024-04-27 13:46:53
合計ジャッジ時間 4,849 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 88 ms
51,264 KB
testcase_01 AC 87 ms
51,156 KB
testcase_02 AC 87 ms
51,008 KB
testcase_03 AC 103 ms
52,792 KB
testcase_04 AC 88 ms
51,360 KB
testcase_05 AC 97 ms
52,916 KB
testcase_06 AC 133 ms
53,572 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class No00000495_Main {
	static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	public static void main(String[] args) throws IOException {
		String s = br.readLine();
		int l =0, r = 0;
		for(int i = 0; i < s.length()-1; i+= 5) {
			if(s.substring(i, i + 5).indexOf("*") == 1) {
				r++;
			} else {
				l++;
			}
		}
		System.out.println(l + " "+ r);
	}
}
0