結果
問題 |
No.204 ゴールデン・ウィーク(2)
|
ユーザー |
|
提出日時 | 2017-05-22 06:35:54 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 524 bytes |
コンパイル時間 | 142 ms |
コンパイル使用メモリ | 82,464 KB |
実行使用メモリ | 59,404 KB |
最終ジャッジ日時 | 2024-09-19 08:57:51 |
合計ジャッジ時間 | 3,414 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 35 WA * 11 |
ソースコード
# pythonしょしんしゃ d = int(input()) ll = "xxxxxxxxxxxxxxx" + input() + input() + "xxxxxxxxxxxxxxx" result = d for x in range(1,30): fail = False for i in range(x, x + d): if ll[x] == 'o': fail = True break # l[x] = 'o' # むり if fail: continue 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)