結果

問題 No.204 ゴールデン・ウィーク(2)
ユーザー c-yan
提出日時 2021-03-15 23:35:07
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 332 bytes
コンパイル時間 495 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-11-07 12:22:55
合計ジャッジ時間 2,935 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21 WA * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

D = int(input())
C = input() + input()

result = 0
for i in range(14):
    t = list(C)
    j = i
    while j < 14 and t[j] == 'o':
        j += 1
    c = 0
    while c < D and j < 14 and t[j] == 'x':
        t[j] = 'o'
        j += 1
        c += 1
    result = max(result, max(len(a) for a in ''.join(t).split('x')))
print(result)
0