結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー 37zigen37zigen
提出日時 2016-03-31 12:47:05
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 1,000 ms
コード長 480 bytes
コンパイル時間 2,317 ms
コンパイル使用メモリ 73,916 KB
実行使用メモリ 55,940 KB
最終ジャッジ日時 2023-08-11 16:07:44
合計ジャッジ時間 7,175 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,768 KB
testcase_01 AC 123 ms
55,412 KB
testcase_02 AC 119 ms
55,340 KB
testcase_03 AC 120 ms
55,412 KB
testcase_04 AC 122 ms
55,616 KB
testcase_05 AC 122 ms
55,656 KB
testcase_06 AC 121 ms
55,672 KB
testcase_07 AC 120 ms
55,940 KB
testcase_08 AC 115 ms
55,852 KB
testcase_09 AC 118 ms
55,532 KB
testcase_10 AC 119 ms
55,648 KB
testcase_11 AC 122 ms
55,612 KB
testcase_12 AC 118 ms
55,612 KB
testcase_13 AC 121 ms
55,900 KB
testcase_14 AC 123 ms
55,844 KB
testcase_15 AC 122 ms
55,668 KB
testcase_16 AC 122 ms
55,340 KB
testcase_17 AC 125 ms
55,644 KB
testcase_18 AC 124 ms
55,416 KB
testcase_19 AC 122 ms
55,344 KB
testcase_20 AC 121 ms
55,888 KB
testcase_21 AC 121 ms
55,608 KB
testcase_22 AC 120 ms
55,536 KB
testcase_23 AC 119 ms
55,748 KB
testcase_24 AC 120 ms
55,344 KB
testcase_25 AC 124 ms
55,880 KB
testcase_26 AC 124 ms
55,940 KB
testcase_27 AC 122 ms
54,032 KB
testcase_28 AC 123 ms
55,340 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder203;
import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		String str1=sc.nextLine();
		String str2=sc.nextLine();
		String str=str1+str2;
		int count=0;
		int max=0;
		for(int i=0;i<str.length();i++){
			if(str.charAt(i)=='o'){
				count++;
				max=Math.max(count, max);
			}else if(str.charAt(i)==('x')){
				max=Math.max(count, max);
				count=0;
			}
		}
		System.out.println(max);
	}
}
0