結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー rf141rf141
提出日時 2015-08-07 20:36:48
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 1,000 ms
コード長 514 bytes
コンパイル時間 3,403 ms
コンパイル使用メモリ 76,588 KB
実行使用メモリ 41,548 KB
最終ジャッジ日時 2024-04-29 07:51:07
合計ジャッジ時間 8,006 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
40,992 KB
testcase_01 AC 109 ms
40,148 KB
testcase_02 AC 123 ms
41,456 KB
testcase_03 AC 124 ms
40,896 KB
testcase_04 AC 116 ms
41,244 KB
testcase_05 AC 111 ms
41,548 KB
testcase_06 AC 114 ms
41,148 KB
testcase_07 AC 126 ms
41,348 KB
testcase_08 AC 126 ms
41,176 KB
testcase_09 AC 115 ms
40,024 KB
testcase_10 AC 123 ms
41,012 KB
testcase_11 AC 125 ms
41,276 KB
testcase_12 AC 125 ms
41,352 KB
testcase_13 AC 129 ms
41,172 KB
testcase_14 AC 127 ms
41,352 KB
testcase_15 AC 124 ms
41,256 KB
testcase_16 AC 124 ms
41,516 KB
testcase_17 AC 123 ms
41,336 KB
testcase_18 AC 125 ms
40,972 KB
testcase_19 AC 127 ms
41,328 KB
testcase_20 AC 112 ms
40,284 KB
testcase_21 AC 125 ms
41,288 KB
testcase_22 AC 128 ms
41,088 KB
testcase_23 AC 125 ms
41,124 KB
testcase_24 AC 113 ms
41,420 KB
testcase_25 AC 125 ms
41,092 KB
testcase_26 AC 113 ms
39,860 KB
testcase_27 AC 126 ms
41,012 KB
testcase_28 AC 124 ms
41,296 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