結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー TatsuDXTatsuDX
提出日時 2016-09-09 00:38:03
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 1,000 ms
コード長 361 bytes
コンパイル時間 3,645 ms
コンパイル使用メモリ 76,204 KB
実行使用メモリ 41,488 KB
最終ジャッジ日時 2024-04-29 08:10:45
合計ジャッジ時間 8,047 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
41,192 KB
testcase_01 AC 124 ms
41,072 KB
testcase_02 AC 123 ms
41,000 KB
testcase_03 AC 124 ms
41,116 KB
testcase_04 AC 125 ms
41,488 KB
testcase_05 AC 125 ms
40,864 KB
testcase_06 AC 125 ms
41,036 KB
testcase_07 AC 126 ms
41,112 KB
testcase_08 AC 112 ms
40,052 KB
testcase_09 AC 112 ms
39,728 KB
testcase_10 AC 113 ms
40,020 KB
testcase_11 AC 125 ms
41,156 KB
testcase_12 AC 110 ms
39,936 KB
testcase_13 AC 124 ms
41,036 KB
testcase_14 AC 126 ms
40,872 KB
testcase_15 AC 117 ms
39,824 KB
testcase_16 AC 125 ms
40,932 KB
testcase_17 AC 113 ms
39,924 KB
testcase_18 AC 111 ms
40,196 KB
testcase_19 AC 126 ms
41,204 KB
testcase_20 AC 123 ms
40,936 KB
testcase_21 AC 127 ms
41,064 KB
testcase_22 AC 111 ms
39,760 KB
testcase_23 AC 124 ms
40,832 KB
testcase_24 AC 123 ms
40,892 KB
testcase_25 AC 124 ms
41,076 KB
testcase_26 AC 124 ms
40,680 KB
testcase_27 AC 124 ms
41,032 KB
testcase_28 AC 124 ms
40,936 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