結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー TwinkleStar74TwinkleStar74
提出日時 2017-10-29 03:27:31
言語 Java21
(openjdk 21)
結果
AC  
実行時間 58 ms / 1,000 ms
コード長 723 bytes
コンパイル時間 3,507 ms
コンパイル使用メモリ 80,264 KB
実行使用メモリ 37,244 KB
最終ジャッジ日時 2024-04-29 08:27:36
合計ジャッジ時間 6,079 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 55 ms
36,932 KB
testcase_01 AC 55 ms
37,028 KB
testcase_02 AC 58 ms
36,880 KB
testcase_03 AC 58 ms
36,872 KB
testcase_04 AC 56 ms
36,984 KB
testcase_05 AC 57 ms
36,692 KB
testcase_06 AC 57 ms
36,808 KB
testcase_07 AC 57 ms
36,980 KB
testcase_08 AC 56 ms
36,780 KB
testcase_09 AC 56 ms
37,000 KB
testcase_10 AC 56 ms
36,692 KB
testcase_11 AC 56 ms
37,116 KB
testcase_12 AC 54 ms
37,016 KB
testcase_13 AC 56 ms
37,032 KB
testcase_14 AC 56 ms
36,984 KB
testcase_15 AC 56 ms
36,768 KB
testcase_16 AC 56 ms
36,784 KB
testcase_17 AC 57 ms
36,956 KB
testcase_18 AC 57 ms
37,000 KB
testcase_19 AC 55 ms
37,244 KB
testcase_20 AC 55 ms
37,020 KB
testcase_21 AC 56 ms
37,000 KB
testcase_22 AC 56 ms
36,988 KB
testcase_23 AC 56 ms
36,988 KB
testcase_24 AC 55 ms
37,012 KB
testcase_25 AC 56 ms
37,224 KB
testcase_26 AC 56 ms
37,016 KB
testcase_27 AC 56 ms
37,032 KB
testcase_28 AC 56 ms
37,088 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

public class No203 {
	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str = br.readLine();
		String str2 = br.readLine();
		String str3 = str + str2;
		System.out.println(check(str3));
	}
	
	public static int check(String s){
		int holiday = 0;
		int maxHoliday = 0;
		char[] day = s.toCharArray();
		for(int i=0; i < 14; i++){
			if(day[i] == 'o') holiday++;
			else{ 
				if(maxHoliday < holiday){
					maxHoliday = holiday;
				}
				holiday = 0;
				}
		}
		if(maxHoliday < holiday) return holiday;
		else return maxHoliday;
	}
}
0