結果

問題 No.204 ゴールデン・ウィーク(2)
ユーザー mlihua09
提出日時 2020-09-16 18:17:13
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 408 bytes
コンパイル時間 168 ms
コンパイル使用メモリ 82,408 KB
実行使用メモリ 54,288 KB
最終ジャッジ日時 2024-06-22 03:25:16
合計ジャッジ時間 3,524 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21 WA * 25
権限があれば一括ダウンロードができます

ソースコード

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