結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー thorikawathorikawa
提出日時 2015-05-08 22:23:48
言語 Java19
(openjdk 21)
結果
AC  
実行時間 125 ms / 1,000 ms
コード長 510 bytes
コンパイル時間 4,443 ms
コンパイル使用メモリ 81,100 KB
実行使用メモリ 56,164 KB
最終ジャッジ日時 2023-08-11 15:28:26
合計ジャッジ時間 8,424 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,836 KB
testcase_01 AC 122 ms
55,892 KB
testcase_02 AC 122 ms
55,804 KB
testcase_03 AC 122 ms
55,436 KB
testcase_04 AC 121 ms
56,164 KB
testcase_05 AC 122 ms
55,800 KB
testcase_06 AC 122 ms
55,952 KB
testcase_07 AC 121 ms
55,892 KB
testcase_08 AC 121 ms
55,792 KB
testcase_09 AC 121 ms
55,476 KB
testcase_10 AC 123 ms
55,616 KB
testcase_11 AC 121 ms
56,096 KB
testcase_12 AC 122 ms
55,572 KB
testcase_13 AC 121 ms
55,668 KB
testcase_14 AC 122 ms
55,432 KB
testcase_15 AC 122 ms
55,940 KB
testcase_16 AC 122 ms
55,884 KB
testcase_17 AC 122 ms
55,864 KB
testcase_18 AC 123 ms
55,832 KB
testcase_19 AC 122 ms
55,652 KB
testcase_20 AC 123 ms
55,856 KB
testcase_21 AC 122 ms
55,680 KB
testcase_22 AC 121 ms
55,736 KB
testcase_23 AC 121 ms
55,912 KB
testcase_24 AC 121 ms
55,612 KB
testcase_25 AC 122 ms
55,672 KB
testcase_26 AC 125 ms
55,628 KB
testcase_27 AC 121 ms
55,692 KB
testcase_28 AC 121 ms
55,564 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

    public static void main(String[] argv) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.next();
        s += scanner.next();
        int count = 0;
        int res = 0;
        for (int i = 0; i < 14; i++) {
            if (s.charAt(i) == 'o') {
                count++;
                res = Math.max(res, count);
            } else {
                count = 0;
            }
        }
        System.out.println(res);
    }
}
0