結果

問題 No.204 ゴールデン・ウィーク(2)
ユーザー mai
提出日時 2017-05-22 06:46:16
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 47 ms / 1,000 ms
コード長 474 bytes
コンパイル時間 169 ms
コンパイル使用メモリ 82,532 KB
実行使用メモリ 59,648 KB
最終ジャッジ日時 2024-12-24 11:59:14
合計ジャッジ時間 3,737 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 46
権限があれば一括ダウンロードができます

ソースコード

diff #

# pythonしょしんしゃ

dd = int(input())
ll = "xxxxxxxxxxxxxxx" + input() + input() + "xxxxxxxxxxxxxxx"

result = dd
for x in range(1,30):
    d = 0
    for i in range(x, x + dd):
        if ll[i] == 'o': break
        d+=1
        # l[x] = 'o' # むり
    
    l = ll[:x]+('o'*d)+ll[x+d:]
    # print(l)
    
    nice = 0
    for c in l:
        if c == 'o':
            nice+=1
            result = max(result, nice)
        else:
            nice = 0

print(result)
0