結果

問題 No.204 ゴールデン・ウィーク(2)
ユーザー thorikawathorikawa
提出日時 2015-05-08 23:05:42
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 997 bytes
コンパイル時間 2,363 ms
コンパイル使用メモリ 76,772 KB
実行使用メモリ 41,524 KB
最終ジャッジ日時 2024-04-21 13:12:30
合計ジャッジ時間 8,546 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 100 ms
41,260 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 98 ms
41,296 KB
testcase_05 AC 108 ms
41,520 KB
testcase_06 AC 98 ms
41,184 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 108 ms
41,524 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 108 ms
41,148 KB
testcase_17 AC 113 ms
41,332 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 111 ms
41,024 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 115 ms
41,472 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 108 ms
41,312 KB
testcase_30 AC 102 ms
40,168 KB
testcase_31 AC 98 ms
41,080 KB
testcase_32 WA -
testcase_33 WA -
testcase_34 AC 107 ms
40,024 KB
testcase_35 AC 109 ms
41,208 KB
testcase_36 AC 102 ms
40,208 KB
testcase_37 AC 100 ms
40,232 KB
testcase_38 AC 110 ms
41,140 KB
testcase_39 WA -
testcase_40 AC 102 ms
40,320 KB
testcase_41 AC 107 ms
41,044 KB
testcase_42 WA -
testcase_43 AC 108 ms
41,116 KB
testcase_44 AC 108 ms
41,212 KB
testcase_45 AC 94 ms
40,116 KB
testcase_46 AC 105 ms
40,240 KB
testcase_47 WA -
testcase_48 AC 103 ms
39,780 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    public static void main(String[] argv) {
        Scanner scanner = new Scanner(System.in);
        int d = scanner.nextInt();
        String s = scanner.next();
        s += scanner.next();
        int res = 0;
        for (int i = 0; i < 14; ++i) {
//            int len = 0;
//            for (int j = 0; j < d && j < 14 - i; ++j) {
//                if (s.charAt(i + j) == 'o') {
//                    break;
//                }
//                len++;
//            }
            int count = 0;
            for (int j = 0; j < 14; ++j) {
//                boolean isYukyu = (j - i >= 0) && ((j - i) < len);
                boolean isYukyu = (j - i >= 0) && ((j - i) < d);
                if (s.charAt(j) == 'o' || isYukyu) {
                    count++;
                    res = Math.max(res, count);
                } else {
                    count = 0;
                }
            }
        }
        System.out.println(res);
    }
}
0