結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー mits58mits58
提出日時 2016-06-05 17:42:57
言語 Java19
(openjdk 21)
結果
AC  
実行時間 127 ms / 1,000 ms
コード長 530 bytes
コンパイル時間 2,074 ms
コンパイル使用メモリ 71,220 KB
実行使用メモリ 55,808 KB
最終ジャッジ日時 2023-08-11 16:13:43
合計ジャッジ時間 6,838 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
55,492 KB
testcase_01 AC 117 ms
55,736 KB
testcase_02 AC 117 ms
55,660 KB
testcase_03 AC 119 ms
55,240 KB
testcase_04 AC 117 ms
55,476 KB
testcase_05 AC 116 ms
55,584 KB
testcase_06 AC 117 ms
55,808 KB
testcase_07 AC 119 ms
55,636 KB
testcase_08 AC 118 ms
55,800 KB
testcase_09 AC 121 ms
55,508 KB
testcase_10 AC 118 ms
55,440 KB
testcase_11 AC 117 ms
55,308 KB
testcase_12 AC 117 ms
55,540 KB
testcase_13 AC 118 ms
55,432 KB
testcase_14 AC 116 ms
55,432 KB
testcase_15 AC 116 ms
55,508 KB
testcase_16 AC 118 ms
55,516 KB
testcase_17 AC 120 ms
55,432 KB
testcase_18 AC 118 ms
55,560 KB
testcase_19 AC 117 ms
55,508 KB
testcase_20 AC 115 ms
55,584 KB
testcase_21 AC 117 ms
55,468 KB
testcase_22 AC 118 ms
55,728 KB
testcase_23 AC 123 ms
55,428 KB
testcase_24 AC 119 ms
55,732 KB
testcase_25 AC 114 ms
55,432 KB
testcase_26 AC 127 ms
55,728 KB
testcase_27 AC 116 ms
55,540 KB
testcase_28 AC 117 ms
55,428 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