結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー mits58mits58
提出日時 2016-06-05 17:42:57
言語 Java21
(openjdk 21)
結果
AC  
実行時間 112 ms / 1,000 ms
コード長 530 bytes
コンパイル時間 2,054 ms
コンパイル使用メモリ 74,432 KB
実行使用メモリ 41,600 KB
最終ジャッジ日時 2024-04-29 08:07:15
合計ジャッジ時間 5,671 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 104 ms
41,204 KB
testcase_01 AC 102 ms
39,976 KB
testcase_02 AC 92 ms
41,304 KB
testcase_03 AC 105 ms
39,908 KB
testcase_04 AC 104 ms
39,952 KB
testcase_05 AC 112 ms
40,624 KB
testcase_06 AC 104 ms
41,316 KB
testcase_07 AC 105 ms
41,112 KB
testcase_08 AC 102 ms
41,100 KB
testcase_09 AC 104 ms
41,268 KB
testcase_10 AC 103 ms
39,996 KB
testcase_11 AC 91 ms
40,396 KB
testcase_12 AC 102 ms
41,180 KB
testcase_13 AC 107 ms
41,268 KB
testcase_14 AC 105 ms
39,876 KB
testcase_15 AC 104 ms
41,276 KB
testcase_16 AC 100 ms
41,052 KB
testcase_17 AC 98 ms
41,404 KB
testcase_18 AC 107 ms
39,736 KB
testcase_19 AC 107 ms
40,192 KB
testcase_20 AC 96 ms
41,076 KB
testcase_21 AC 105 ms
40,904 KB
testcase_22 AC 111 ms
41,600 KB
testcase_23 AC 107 ms
41,572 KB
testcase_24 AC 104 ms
39,720 KB
testcase_25 AC 99 ms
41,032 KB
testcase_26 AC 105 ms
41,108 KB
testcase_27 AC 99 ms
39,976 KB
testcase_28 AC 107 ms
41,216 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main{
	public static void main(String args[]){
		Scanner sc=new Scanner(System.in);
		while(sc.hasNext()){
			char[] c=new char[14];
			String str=sc.next();
			for(int i=0;i<7;i++) c[i]=str.charAt(i);
			str=sc.next();
			for(int i=0;i<7;i++) c[i+7]=str.charAt(i);
			int res=0;
			for(int i=0;i<c.length;i++){
				if(c[i]=='o'){
					int t=1; i++;
					while(i<c.length && c[i]=='o'){
						t++;
						i++;
					}
					res=Math.max(res, t);
				}
			}
			System.out.println(res);
		}
	}
}
0