結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー TatsuDX
提出日時 2016-09-09 00:38:03
言語 Java
(openjdk 23)
結果
AC  
実行時間 137 ms / 1,000 ms
コード長 361 bytes
コンパイル時間 3,764 ms
コンパイル使用メモリ 76,104 KB
実行使用メモリ 54,188 KB
最終ジャッジ日時 2024-11-18 09:48:02
合計ジャッジ時間 8,840 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

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