結果

問題 No.204 ゴールデン・ウィーク(2)
ユーザー mlihua09mlihua09
提出日時 2020-09-16 18:17:13
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 408 bytes
コンパイル時間 846 ms
コンパイル使用メモリ 86,936 KB
実行使用メモリ 71,740 KB
最終ジャッジ日時 2023-09-04 03:44:55
合計ジャッジ時間 6,478 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
70,608 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 73 ms
70,664 KB
testcase_05 AC 72 ms
70,800 KB
testcase_06 AC 73 ms
70,832 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 72 ms
70,684 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 71 ms
70,652 KB
testcase_17 AC 72 ms
70,652 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 71 ms
70,852 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 73 ms
70,776 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 73 ms
70,680 KB
testcase_30 AC 71 ms
70,752 KB
testcase_31 AC 74 ms
70,848 KB
testcase_32 WA -
testcase_33 WA -
testcase_34 AC 74 ms
70,696 KB
testcase_35 AC 73 ms
70,832 KB
testcase_36 AC 73 ms
70,632 KB
testcase_37 AC 73 ms
70,556 KB
testcase_38 AC 73 ms
70,532 KB
testcase_39 WA -
testcase_40 AC 71 ms
70,828 KB
testcase_41 AC 73 ms
70,852 KB
testcase_42 WA -
testcase_43 AC 72 ms
70,856 KB
testcase_44 AC 72 ms
70,680 KB
testcase_45 AC 71 ms
70,828 KB
testcase_46 AC 71 ms
70,788 KB
testcase_47 WA -
testcase_48 AC 71 ms
70,908 KB
権限があれば一括ダウンロードができます

ソースコード

diff #


D = int(input())

X = [0 if i == 'x' else 1 for i in input()] + [0 if i == 'x' else 1 for i in input()] + [0]

ans = 0

for i in range(0, 14- D):
    
    x = X.copy()
    for j in range(i, i + D):
        x[j] = 1
        
    a = 0
    b = 0
    for j in x:
        if j == 1:
            b += 1
        else:
            a = max(a, b)
            b = 0
            
    ans = max(ans, a)
    
print(ans)
0