結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー 37zigen37zigen
提出日時 2016-03-31 12:47:05
言語 Java21
(openjdk 21)
結果
AC  
実行時間 132 ms / 1,000 ms
コード長 480 bytes
コンパイル時間 2,164 ms
コンパイル使用メモリ 76,188 KB
実行使用メモリ 41,804 KB
最終ジャッジ日時 2024-04-29 08:03:49
合計ジャッジ時間 6,784 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
40,888 KB
testcase_01 AC 126 ms
41,464 KB
testcase_02 AC 129 ms
41,348 KB
testcase_03 AC 128 ms
40,932 KB
testcase_04 AC 128 ms
41,396 KB
testcase_05 AC 128 ms
41,192 KB
testcase_06 AC 125 ms
41,016 KB
testcase_07 AC 125 ms
41,480 KB
testcase_08 AC 126 ms
41,508 KB
testcase_09 AC 113 ms
40,944 KB
testcase_10 AC 124 ms
41,280 KB
testcase_11 AC 127 ms
41,804 KB
testcase_12 AC 126 ms
41,508 KB
testcase_13 AC 128 ms
41,396 KB
testcase_14 AC 128 ms
41,268 KB
testcase_15 AC 132 ms
41,496 KB
testcase_16 AC 130 ms
41,576 KB
testcase_17 AC 130 ms
41,260 KB
testcase_18 AC 129 ms
41,100 KB
testcase_19 AC 126 ms
41,000 KB
testcase_20 AC 127 ms
41,140 KB
testcase_21 AC 126 ms
41,004 KB
testcase_22 AC 126 ms
41,532 KB
testcase_23 AC 127 ms
41,012 KB
testcase_24 AC 126 ms
41,084 KB
testcase_25 AC 127 ms
40,992 KB
testcase_26 AC 127 ms
41,344 KB
testcase_27 AC 112 ms
40,148 KB
testcase_28 AC 128 ms
41,564 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