結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー rf141rf141
提出日時 2015-08-07 20:36:48
言語 Java21
(openjdk 21)
結果
AC  
実行時間 138 ms / 1,000 ms
コード長 514 bytes
コンパイル時間 4,619 ms
コンパイル使用メモリ 74,572 KB
実行使用メモリ 55,612 KB
最終ジャッジ日時 2023-08-11 15:50:05
合計ジャッジ時間 9,112 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
55,408 KB
testcase_01 AC 128 ms
55,204 KB
testcase_02 AC 126 ms
55,224 KB
testcase_03 AC 127 ms
55,104 KB
testcase_04 AC 128 ms
55,376 KB
testcase_05 AC 128 ms
55,324 KB
testcase_06 AC 127 ms
55,332 KB
testcase_07 AC 131 ms
55,464 KB
testcase_08 AC 135 ms
55,396 KB
testcase_09 AC 128 ms
55,604 KB
testcase_10 AC 135 ms
55,500 KB
testcase_11 AC 132 ms
55,112 KB
testcase_12 AC 134 ms
55,408 KB
testcase_13 AC 130 ms
55,424 KB
testcase_14 AC 128 ms
55,468 KB
testcase_15 AC 138 ms
55,204 KB
testcase_16 AC 130 ms
55,264 KB
testcase_17 AC 129 ms
55,064 KB
testcase_18 AC 133 ms
55,512 KB
testcase_19 AC 130 ms
55,380 KB
testcase_20 AC 129 ms
55,392 KB
testcase_21 AC 128 ms
55,456 KB
testcase_22 AC 131 ms
55,444 KB
testcase_23 AC 129 ms
55,612 KB
testcase_24 AC 135 ms
55,204 KB
testcase_25 AC 134 ms
55,448 KB
testcase_26 AC 131 ms
55,408 KB
testcase_27 AC 134 ms
55,220 KB
testcase_28 AC 135 ms
55,408 KB
権限があれば一括ダウンロードができます

ソースコード

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;
		}
		String[] h = str.split("x",0);
		int max = 0;
		for(int i = 0;i<h.length;i++){
			if(h[i].length() > max){
				max = h[i].length();
			}
		}
		return max;
	}
}
0