結果

問題 No.495 (^^*) Easy
ユーザー YOSHI
提出日時 2021-03-17 21:27:17
言語 Java
(openjdk 23)
結果
AC  
実行時間 132 ms / 2,000 ms
コード長 485 bytes
コンパイル時間 3,656 ms
コンパイル使用メモリ 81,428 KB
実行使用メモリ 41,792 KB
最終ジャッジ日時 2024-11-15 16:03:06
合計ジャッジ時間 4,892 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

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