結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー r.suzukir.suzuki
提出日時 2015-12-24 23:39:23
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 1,000 ms
コード長 458 bytes
コンパイル時間 3,366 ms
コンパイル使用メモリ 73,216 KB
実行使用メモリ 56,360 KB
最終ジャッジ日時 2023-08-11 16:04:14
合計ジャッジ時間 8,221 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
55,780 KB
testcase_01 AC 122 ms
55,556 KB
testcase_02 AC 124 ms
55,480 KB
testcase_03 AC 122 ms
55,572 KB
testcase_04 AC 123 ms
55,240 KB
testcase_05 AC 122 ms
55,556 KB
testcase_06 AC 119 ms
55,632 KB
testcase_07 AC 122 ms
55,992 KB
testcase_08 AC 122 ms
55,244 KB
testcase_09 AC 121 ms
55,548 KB
testcase_10 AC 122 ms
56,360 KB
testcase_11 AC 124 ms
55,572 KB
testcase_12 AC 121 ms
55,520 KB
testcase_13 AC 121 ms
55,320 KB
testcase_14 AC 120 ms
55,320 KB
testcase_15 AC 123 ms
55,832 KB
testcase_16 AC 120 ms
55,740 KB
testcase_17 AC 125 ms
55,572 KB
testcase_18 AC 123 ms
55,812 KB
testcase_19 AC 122 ms
55,232 KB
testcase_20 AC 123 ms
55,628 KB
testcase_21 AC 121 ms
55,624 KB
testcase_22 AC 121 ms
55,808 KB
testcase_23 AC 120 ms
55,628 KB
testcase_24 AC 121 ms
55,568 KB
testcase_25 AC 119 ms
55,740 KB
testcase_26 AC 122 ms
55,800 KB
testcase_27 AC 121 ms
55,516 KB
testcase_28 AC 120 ms
55,636 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