結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
54,028 KB
testcase_01 AC 129 ms
54,100 KB
testcase_02 AC 129 ms
54,152 KB
testcase_03 AC 130 ms
54,056 KB
testcase_04 AC 127 ms
54,012 KB
testcase_05 AC 140 ms
54,012 KB
testcase_06 AC 127 ms
54,124 KB
testcase_07 AC 130 ms
54,100 KB
testcase_08 AC 136 ms
54,220 KB
testcase_09 AC 128 ms
53,984 KB
testcase_10 AC 128 ms
54,168 KB
testcase_11 AC 142 ms
53,988 KB
testcase_12 AC 129 ms
54,184 KB
testcase_13 AC 131 ms
54,164 KB
testcase_14 AC 127 ms
54,108 KB
testcase_15 AC 113 ms
52,924 KB
testcase_16 AC 125 ms
54,020 KB
testcase_17 AC 129 ms
54,024 KB
testcase_18 AC 129 ms
54,076 KB
testcase_19 AC 128 ms
53,984 KB
testcase_20 AC 129 ms
54,012 KB
testcase_21 AC 127 ms
53,816 KB
testcase_22 AC 132 ms
54,248 KB
testcase_23 AC 134 ms
53,968 KB
testcase_24 AC 129 ms
53,872 KB
testcase_25 AC 125 ms
54,128 KB
testcase_26 AC 127 ms
53,732 KB
testcase_27 AC 128 ms
54,148 KB
testcase_28 AC 128 ms
54,076 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