結果

問題 No.495 (^^*) Easy
ユーザー TwinkleStar74TwinkleStar74
提出日時 2017-10-08 21:54:41
言語 Java21
(openjdk 21)
結果
AC  
実行時間 108 ms / 2,000 ms
コード長 777 bytes
コンパイル時間 2,255 ms
コンパイル使用メモリ 75,380 KB
実行使用メモリ 53,056 KB
最終ジャッジ日時 2024-04-28 13:36:53
合計ジャッジ時間 3,296 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
50,840 KB
testcase_01 AC 80 ms
51,212 KB
testcase_02 AC 77 ms
51,320 KB
testcase_03 AC 79 ms
51,524 KB
testcase_04 AC 80 ms
50,636 KB
testcase_05 AC 87 ms
51,132 KB
testcase_06 AC 108 ms
53,056 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

class No495{
	public static void main(String[] args) {
		try{
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			int left = 0; int right = 0;
			Hantei(br,left,right);
		}
		catch(IOException e){
			e.getStackTrace();
		}
		catch(NumberFormatException e){
			e.getStackTrace();
		}
	}
	public static void Hantei(BufferedReader br, int left, int right)  throws IOException{
		String str = br.readLine();
		boolean bln = true;
		int i = 0;
		while(bln){
			if(str.charAt(5*i) == '#'){
				bln = false;
			}
			else if(str.charAt(5*i+3) == '*'){
				left++;
				i++;
			}
			else {
				right++;
				i++;
			}
		}
		System.out.println(left +" "+ right);
	}
}
0