結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー rf141rf141
提出日時 2015-08-07 20:24:19
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 688 bytes
コンパイル時間 4,140 ms
コンパイル使用メモリ 73,312 KB
実行使用メモリ 58,016 KB
最終ジャッジ日時 2023-09-25 05:54:44
合計ジャッジ時間 8,976 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
55,764 KB
testcase_01 AC 120 ms
55,372 KB
testcase_02 AC 119 ms
55,640 KB
testcase_03 AC 117 ms
55,412 KB
testcase_04 AC 119 ms
56,068 KB
testcase_05 AC 121 ms
53,896 KB
testcase_06 AC 124 ms
55,832 KB
testcase_07 AC 119 ms
55,720 KB
testcase_08 AC 117 ms
55,592 KB
testcase_09 AC 118 ms
55,416 KB
testcase_10 WA -
testcase_11 AC 120 ms
56,024 KB
testcase_12 AC 120 ms
55,644 KB
testcase_13 AC 124 ms
55,740 KB
testcase_14 AC 122 ms
57,620 KB
testcase_15 AC 120 ms
55,876 KB
testcase_16 WA -
testcase_17 AC 119 ms
56,024 KB
testcase_18 AC 120 ms
55,572 KB
testcase_19 AC 122 ms
55,968 KB
testcase_20 AC 123 ms
56,144 KB
testcase_21 AC 122 ms
55,444 KB
testcase_22 AC 121 ms
55,804 KB
testcase_23 AC 121 ms
55,768 KB
testcase_24 AC 121 ms
53,532 KB
testcase_25 AC 120 ms
55,636 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class gw{
	public static void main(String... args){
		Scanner scan = new Scanner(System.in);
		String str1 = scan.next();
		String str2 = scan.next();
		System.out.println(calc(str1+str2));
	}
	public static int calc(String str){
		int[] counter = new int[14];
		for(int i = 0; i < counter.length;i++){
			counter[i] = 0;
		}
		int count = 0;
		int space = 0;
		for(int i = 0; i < str.length(); i++){
			if(str.substring(i,i+1).equals("o")){
				count++;
			}else{
				counter[space] = count;
				count=0;
				space++;
			}
		}
		int max = counter[0];
		for(int i = 1; i < space; i++){
			if(max < counter[i]){
				max = counter[i];
			}
		}

		return max;
	}
}
0