結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー GrenacheGrenache
提出日時 2015-05-08 22:24:04
言語 Java19
(openjdk 21)
結果
AC  
実行時間 127 ms / 1,000 ms
コード長 424 bytes
コンパイル時間 2,473 ms
コンパイル使用メモリ 80,532 KB
実行使用メモリ 56,028 KB
最終ジャッジ日時 2023-08-11 15:29:43
合計ジャッジ時間 7,482 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,592 KB
testcase_01 AC 123 ms
56,028 KB
testcase_02 AC 122 ms
55,760 KB
testcase_03 AC 123 ms
55,460 KB
testcase_04 AC 124 ms
55,684 KB
testcase_05 AC 126 ms
55,732 KB
testcase_06 AC 126 ms
55,372 KB
testcase_07 AC 124 ms
55,880 KB
testcase_08 AC 125 ms
55,660 KB
testcase_09 AC 125 ms
55,652 KB
testcase_10 AC 125 ms
55,644 KB
testcase_11 AC 124 ms
55,684 KB
testcase_12 AC 125 ms
55,456 KB
testcase_13 AC 125 ms
55,416 KB
testcase_14 AC 124 ms
55,564 KB
testcase_15 AC 125 ms
55,604 KB
testcase_16 AC 123 ms
55,568 KB
testcase_17 AC 125 ms
55,736 KB
testcase_18 AC 125 ms
55,440 KB
testcase_19 AC 127 ms
55,928 KB
testcase_20 AC 123 ms
55,640 KB
testcase_21 AC 123 ms
56,016 KB
testcase_22 AC 122 ms
55,464 KB
testcase_23 AC 123 ms
55,812 KB
testcase_24 AC 123 ms
55,796 KB
testcase_25 AC 126 ms
55,592 KB
testcase_26 AC 124 ms
55,436 KB
testcase_27 AC 125 ms
55,600 KB
testcase_28 AC 124 ms
55,636 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder150508;
import java.util.Scanner;


public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		String c = sc.next() + sc.next();

		int count = 0;
		int max = 0;
		for (int i = 0; i < c.length(); i++) {
			if (c.charAt(i) == 'o') {
				count++;
				max = Math.max(max, count);
			} else {
				count = 0;
			}
		}

		System.out.println(max);

		sc.close();
	}
}
0