結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー ちよちゃんちよちゃん
提出日時 2016-05-30 12:12:25
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 1,000 ms
コード長 812 bytes
コンパイル時間 3,588 ms
コンパイル使用メモリ 73,432 KB
実行使用メモリ 56,036 KB
最終ジャッジ日時 2023-08-11 16:12:34
合計ジャッジ時間 8,478 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
56,036 KB
testcase_01 AC 124 ms
55,584 KB
testcase_02 AC 125 ms
55,604 KB
testcase_03 AC 125 ms
55,356 KB
testcase_04 AC 123 ms
55,644 KB
testcase_05 AC 125 ms
55,584 KB
testcase_06 AC 125 ms
55,612 KB
testcase_07 AC 125 ms
55,368 KB
testcase_08 AC 126 ms
55,704 KB
testcase_09 AC 125 ms
55,520 KB
testcase_10 AC 124 ms
55,636 KB
testcase_11 AC 127 ms
55,748 KB
testcase_12 AC 124 ms
55,580 KB
testcase_13 AC 123 ms
55,308 KB
testcase_14 AC 123 ms
55,408 KB
testcase_15 AC 125 ms
55,552 KB
testcase_16 AC 125 ms
55,360 KB
testcase_17 AC 125 ms
55,704 KB
testcase_18 AC 125 ms
55,476 KB
testcase_19 AC 124 ms
55,532 KB
testcase_20 AC 126 ms
53,780 KB
testcase_21 AC 122 ms
55,672 KB
testcase_22 AC 125 ms
55,628 KB
testcase_23 AC 124 ms
55,572 KB
testcase_24 AC 127 ms
55,836 KB
testcase_25 AC 126 ms
55,364 KB
testcase_26 AC 126 ms
55,736 KB
testcase_27 AC 125 ms
55,700 KB
testcase_28 AC 126 ms
55,352 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