結果

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

ソースコード

diff #

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

result = 0
for i in range(42):
    t = list(('x' * 14) + C + ('x' * 14))
    j = i
    while j < 42 and t[j] == 'o':
        j += 1
    c = 0
    while c < D and j < 42 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