結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー r.suzukir.suzuki
提出日時 2015-12-24 23:39:23
言語 Java21
(openjdk 21)
結果
AC  
実行時間 139 ms / 1,000 ms
コード長 458 bytes
コンパイル時間 3,445 ms
コンパイル使用メモリ 80,328 KB
実行使用メモリ 54,304 KB
最終ジャッジ日時 2024-04-29 08:01:15
合計ジャッジ時間 8,204 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
54,164 KB
testcase_01 AC 131 ms
53,580 KB
testcase_02 AC 132 ms
53,904 KB
testcase_03 AC 128 ms
54,104 KB
testcase_04 AC 128 ms
54,048 KB
testcase_05 AC 125 ms
54,116 KB
testcase_06 AC 128 ms
53,896 KB
testcase_07 AC 126 ms
54,280 KB
testcase_08 AC 130 ms
53,940 KB
testcase_09 AC 130 ms
54,304 KB
testcase_10 AC 129 ms
54,208 KB
testcase_11 AC 130 ms
54,096 KB
testcase_12 AC 128 ms
54,116 KB
testcase_13 AC 130 ms
53,848 KB
testcase_14 AC 125 ms
53,800 KB
testcase_15 AC 127 ms
54,288 KB
testcase_16 AC 132 ms
54,220 KB
testcase_17 AC 132 ms
53,996 KB
testcase_18 AC 131 ms
54,120 KB
testcase_19 AC 129 ms
54,220 KB
testcase_20 AC 129 ms
53,936 KB
testcase_21 AC 132 ms
53,676 KB
testcase_22 AC 136 ms
54,108 KB
testcase_23 AC 130 ms
54,068 KB
testcase_24 AC 135 ms
53,932 KB
testcase_25 AC 131 ms
53,800 KB
testcase_26 AC 131 ms
54,020 KB
testcase_27 AC 139 ms
53,808 KB
testcase_28 AC 129 ms
53,648 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

public class No_203 {

	public static void main(String[] args) {
		java.util.Scanner sc = new java.util.Scanner(System.in);
		String s1 = sc.next();
		String s2 = sc.next();
		String week = s1 + s2;
		int holiday = 0;
		int max = 0;

		for (int i = 0; i < week.length(); i++) {
			if (week.charAt(i) == 'o') {
				holiday++;
			} else {
				holiday = 0;
			}
			if (max < holiday) {
				max = holiday;
			}
		}
		System.out.println(max);
		sc.close();

	}

}
0