結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー FVRChan
提出日時 2017-10-02 21:21:01
言語 Java
(openjdk 23)
結果
AC  
実行時間 135 ms / 1,000 ms
コード長 419 bytes
コンパイル時間 2,394 ms
コンパイル使用メモリ 77,044 KB
実行使用メモリ 54,400 KB
最終ジャッジ日時 2024-11-18 10:16:28
合計ジャッジ時間 6,895 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class Main{
	private static Scanner sc=new Scanner(System.in);
	public static void main(String args[])throws Exception{
		char are[]=(sc.nextLine()+sc.nextLine()).toCharArray();
		int max=0,counter=0;
		for(char element:are){
			if(element == 'o'){
				counter++;
			}else{
				max=Math.max(max,counter);
				counter=0;
			}
		}max=Math.max(max,counter);
		System.out.println(max);
	}
}
0