結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー Grenache
提出日時 2015-05-08 22:24:04
言語 Java
(openjdk 23)
結果
AC  
実行時間 140 ms / 1,000 ms
コード長 424 bytes
コンパイル時間 2,475 ms
コンパイル使用メモリ 76,136 KB
実行使用メモリ 41,700 KB
最終ジャッジ日時 2024-11-18 08:57:19
合計ジャッジ時間 7,351 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

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