結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー koukonkokoukonko
提出日時 2015-12-15 15:32:48
言語 Java21
(openjdk 21)
結果
AC  
実行時間 49 ms / 1,000 ms
コード長 592 bytes
コンパイル時間 3,091 ms
コンパイル使用メモリ 77,052 KB
実行使用メモリ 49,904 KB
最終ジャッジ日時 2023-08-11 16:02:23
合計ジャッジ時間 4,647 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
49,904 KB
testcase_01 AC 48 ms
49,552 KB
testcase_02 AC 48 ms
49,508 KB
testcase_03 AC 48 ms
49,512 KB
testcase_04 AC 47 ms
49,576 KB
testcase_05 AC 48 ms
49,640 KB
testcase_06 AC 49 ms
49,512 KB
testcase_07 AC 47 ms
49,612 KB
testcase_08 AC 48 ms
49,320 KB
testcase_09 AC 48 ms
49,312 KB
testcase_10 AC 48 ms
49,672 KB
testcase_11 AC 48 ms
49,508 KB
testcase_12 AC 47 ms
49,308 KB
testcase_13 AC 48 ms
49,512 KB
testcase_14 AC 47 ms
49,500 KB
testcase_15 AC 48 ms
49,668 KB
testcase_16 AC 48 ms
49,500 KB
testcase_17 AC 47 ms
49,664 KB
testcase_18 AC 48 ms
49,488 KB
testcase_19 AC 47 ms
49,684 KB
testcase_20 AC 49 ms
49,508 KB
testcase_21 AC 47 ms
49,500 KB
testcase_22 AC 47 ms
49,560 KB
testcase_23 AC 47 ms
49,508 KB
testcase_24 AC 47 ms
49,788 KB
testcase_25 AC 48 ms
49,564 KB
testcase_26 AC 49 ms
49,488 KB
testcase_27 AC 47 ms
49,624 KB
testcase_28 AC 48 ms
49,496 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) {
		BufferedReader read = new BufferedReader(new InputStreamReader(System.in));
		try {
			String line = read.readLine() + read.readLine();

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

			System.out.println(max);

		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
0