結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー TatsuDXTatsuDX
提出日時 2016-09-09 00:38:03
言語 Java21
(openjdk 21)
結果
AC  
実行時間 142 ms / 1,000 ms
コード長 361 bytes
コンパイル時間 3,959 ms
コンパイル使用メモリ 73,872 KB
実行使用メモリ 55,868 KB
最終ジャッジ日時 2023-08-11 16:17:57
合計ジャッジ時間 9,118 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
53,492 KB
testcase_01 AC 125 ms
55,512 KB
testcase_02 AC 131 ms
55,620 KB
testcase_03 AC 137 ms
55,772 KB
testcase_04 AC 139 ms
55,432 KB
testcase_05 AC 142 ms
55,628 KB
testcase_06 AC 134 ms
55,420 KB
testcase_07 AC 133 ms
55,812 KB
testcase_08 AC 129 ms
55,868 KB
testcase_09 AC 124 ms
55,576 KB
testcase_10 AC 129 ms
55,592 KB
testcase_11 AC 127 ms
55,568 KB
testcase_12 AC 125 ms
55,536 KB
testcase_13 AC 128 ms
55,668 KB
testcase_14 AC 128 ms
55,440 KB
testcase_15 AC 132 ms
55,628 KB
testcase_16 AC 128 ms
55,712 KB
testcase_17 AC 127 ms
55,524 KB
testcase_18 AC 126 ms
55,524 KB
testcase_19 AC 126 ms
55,476 KB
testcase_20 AC 126 ms
55,628 KB
testcase_21 AC 125 ms
55,312 KB
testcase_22 AC 126 ms
55,728 KB
testcase_23 AC 128 ms
55,400 KB
testcase_24 AC 126 ms
55,480 KB
testcase_25 AC 124 ms
55,236 KB
testcase_26 AC 126 ms
55,660 KB
testcase_27 AC 131 ms
55,768 KB
testcase_28 AC 129 ms
55,620 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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

		String s = sc.next() + sc.next();
		int cnt = 0, max = 0;
		for(int i = 0; i < s.length(); i++){
			if(s.charAt(i) == 'o'){
				cnt++;
				max = Math.max(max, cnt);
			} else {
				cnt = 0;
			}
		}
		System.out.println(max);
	}
}
0