結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー ちよちゃんちよちゃん
提出日時 2016-05-30 12:12:25
言語 Java21
(openjdk 21)
結果
AC  
実行時間 131 ms / 1,000 ms
コード長 812 bytes
コンパイル時間 3,569 ms
コンパイル使用メモリ 75,436 KB
実行使用メモリ 41,496 KB
最終ジャッジ日時 2024-04-29 08:06:21
合計ジャッジ時間 8,256 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
41,344 KB
testcase_01 AC 128 ms
41,344 KB
testcase_02 AC 109 ms
39,756 KB
testcase_03 AC 123 ms
40,972 KB
testcase_04 AC 125 ms
41,104 KB
testcase_05 AC 109 ms
40,248 KB
testcase_06 AC 111 ms
39,860 KB
testcase_07 AC 125 ms
41,132 KB
testcase_08 AC 127 ms
41,144 KB
testcase_09 AC 128 ms
41,196 KB
testcase_10 AC 126 ms
40,964 KB
testcase_11 AC 126 ms
41,152 KB
testcase_12 AC 128 ms
41,312 KB
testcase_13 AC 128 ms
41,096 KB
testcase_14 AC 130 ms
40,972 KB
testcase_15 AC 130 ms
41,496 KB
testcase_16 AC 113 ms
40,164 KB
testcase_17 AC 127 ms
40,992 KB
testcase_18 AC 131 ms
41,108 KB
testcase_19 AC 128 ms
41,312 KB
testcase_20 AC 112 ms
40,040 KB
testcase_21 AC 123 ms
41,192 KB
testcase_22 AC 123 ms
41,020 KB
testcase_23 AC 109 ms
40,160 KB
testcase_24 AC 109 ms
40,232 KB
testcase_25 AC 125 ms
41,260 KB
testcase_26 AC 113 ms
40,120 KB
testcase_27 AC 123 ms
40,848 KB
testcase_28 AC 125 ms
41,252 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;

import java.util.ArrayList;
import java.util.Scanner;

public class Yuki203 {

	public static void main(String[] args) {
	
		Scanner scan = new Scanner(System.in);
		String str = scan.next();
		String str1 = scan.next();
		ArrayList<String> strArray = new ArrayList<String>();
		scan.close();
		characterSet(strArray,str);
		characterSet(strArray,str1);
		
		int num = 0;
		int ans = 0;
		for ( String i : strArray ){
			if ("o".equals(i)) {
				num++;
				
				if(ans < num){
					ans = num;
				}
				
			} else {
				
				if(ans < num){
					ans = num;
				}
				num = 0;
			}
		}
		System.out.println(ans);

	}
	
	private static void characterSet(ArrayList<String> strArray ,String str) {

		for(int i = 0; i < str.length(); i++ ){
			strArray.add(String.valueOf(str.charAt(i)));
		}
	}
}
0