結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー chiho_miyakochiho_miyako
提出日時 2015-05-08 22:53:27
言語 Java19
(openjdk 21)
結果
AC  
実行時間 128 ms / 1,000 ms
コード長 650 bytes
コンパイル時間 4,763 ms
コンパイル使用メモリ 75,340 KB
実行使用メモリ 57,588 KB
最終ジャッジ日時 2023-08-11 15:37:15
合計ジャッジ時間 9,733 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
55,524 KB
testcase_01 AC 125 ms
55,424 KB
testcase_02 AC 125 ms
55,456 KB
testcase_03 AC 125 ms
55,676 KB
testcase_04 AC 125 ms
55,764 KB
testcase_05 AC 124 ms
55,680 KB
testcase_06 AC 124 ms
55,864 KB
testcase_07 AC 125 ms
55,400 KB
testcase_08 AC 124 ms
55,700 KB
testcase_09 AC 126 ms
55,256 KB
testcase_10 AC 128 ms
55,540 KB
testcase_11 AC 125 ms
57,588 KB
testcase_12 AC 123 ms
55,268 KB
testcase_13 AC 123 ms
55,632 KB
testcase_14 AC 123 ms
55,644 KB
testcase_15 AC 124 ms
55,484 KB
testcase_16 AC 123 ms
55,536 KB
testcase_17 AC 124 ms
55,556 KB
testcase_18 AC 123 ms
55,816 KB
testcase_19 AC 121 ms
55,556 KB
testcase_20 AC 122 ms
56,028 KB
testcase_21 AC 122 ms
55,704 KB
testcase_22 AC 123 ms
55,524 KB
testcase_23 AC 122 ms
55,296 KB
testcase_24 AC 121 ms
55,488 KB
testcase_25 AC 122 ms
55,572 KB
testcase_26 AC 124 ms
55,580 KB
testcase_27 AC 122 ms
55,760 KB
testcase_28 AC 123 ms
55,568 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

class Ideone{
    public static void main (String[] args) throws java.lang.Exception
    {
        Scanner koko = new Scanner(System.in);
        String one = koko.next();
        String two = koko.next();
        String whole = one + two;
        if(whole.equals("xxxxxxxxxxxxxx")){
        	System.out.println(0);
        }else{
        	String[] who = whole.split("x");
            int[] week = new int[who.length];
            for(int i=0; i<who.length; i++){
                week[i]=who[i].length();
            }
            Arrays.sort(week);
            System.out.println(week[who.length-1]);
        }
        
    }
}
0