結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー yagi2yagi2
提出日時 2017-04-21 16:39:30
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 496 bytes
コンパイル時間 2,406 ms
コンパイル使用メモリ 73,628 KB
実行使用メモリ 56,684 KB
最終ジャッジ日時 2023-09-27 10:57:18
合計ジャッジ時間 7,598 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 108 ms
56,076 KB
testcase_01 AC 109 ms
55,976 KB
testcase_02 AC 109 ms
55,772 KB
testcase_03 AC 113 ms
55,756 KB
testcase_04 AC 111 ms
55,672 KB
testcase_05 AC 110 ms
55,340 KB
testcase_06 AC 108 ms
55,564 KB
testcase_07 AC 113 ms
55,928 KB
testcase_08 AC 116 ms
55,716 KB
testcase_09 AC 118 ms
55,828 KB
testcase_10 WA -
testcase_11 AC 114 ms
56,080 KB
testcase_12 AC 114 ms
56,140 KB
testcase_13 AC 114 ms
56,684 KB
testcase_14 AC 115 ms
55,684 KB
testcase_15 AC 114 ms
55,700 KB
testcase_16 WA -
testcase_17 AC 108 ms
56,352 KB
testcase_18 AC 107 ms
56,628 KB
testcase_19 AC 108 ms
54,476 KB
testcase_20 AC 109 ms
56,000 KB
testcase_21 AC 107 ms
55,704 KB
testcase_22 AC 108 ms
56,056 KB
testcase_23 AC 114 ms
55,484 KB
testcase_24 AC 108 ms
55,760 KB
testcase_25 AC 108 ms
56,156 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String W = sc.next() + sc.next();

        int num = 0;
        int tmp = 0;
        for (String s : W.split("")) {
            if (s.equals("o")) {
                tmp++;
            }
            if (s.equals("x")) {
                if (num < tmp) num = tmp;
                tmp = 0;
            }
        }
        System.out.println(num);
    }
}
0