結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー 4A9GN4A9GN
提出日時 2016-07-22 23:25:19
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 683 bytes
コンパイル時間 2,264 ms
コンパイル使用メモリ 74,840 KB
実行使用メモリ 41,436 KB
最終ジャッジ日時 2024-04-24 02:38:02
合計ジャッジ時間 5,871 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 103 ms
41,032 KB
testcase_01 AC 108 ms
41,016 KB
testcase_02 AC 110 ms
41,072 KB
testcase_03 AC 110 ms
41,400 KB
testcase_04 AC 106 ms
41,436 KB
testcase_05 AC 103 ms
41,076 KB
testcase_06 AC 101 ms
40,632 KB
testcase_07 AC 100 ms
40,232 KB
testcase_08 AC 107 ms
40,880 KB
testcase_09 AC 106 ms
41,136 KB
testcase_10 WA -
testcase_11 AC 109 ms
41,416 KB
testcase_12 AC 107 ms
41,336 KB
testcase_13 AC 103 ms
41,160 KB
testcase_14 AC 108 ms
41,224 KB
testcase_15 AC 108 ms
41,016 KB
testcase_16 WA -
testcase_17 AC 101 ms
40,380 KB
testcase_18 AC 105 ms
40,932 KB
testcase_19 AC 96 ms
39,956 KB
testcase_20 AC 102 ms
40,600 KB
testcase_21 AC 111 ms
41,320 KB
testcase_22 AC 98 ms
40,504 KB
testcase_23 AC 109 ms
40,864 KB
testcase_24 AC 110 ms
41,316 KB
testcase_25 AC 113 ms
41,224 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
import java.util.ArrayList;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        ArrayList<Character> al = new ArrayList<Character>();
        String s = sc.next();
        for (char c : s.toCharArray()) al.add(c);
        s = sc.next();
        for (char c : s.toCharArray()) al.add(c);

        int i, c = 0, h = 1, m = 0;
        char f;
        for (i = 0; i < al.size(); i++) {
            f = al.get(i);
            if (f == 'x') {
                h = 0;
                if (m < c) m = c;
                c = 0;
            } else c++;
        }
        System.out.printf("%d\n", m);
    }
}
0