結果
問題 | No.204 ゴールデン・ウィーク(2) |
ユーザー |
![]() |
提出日時 | 2024-05-30 21:34:47 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 282 bytes |
コンパイル時間 | 502 ms |
コンパイル使用メモリ | 82,556 KB |
実行使用メモリ | 54,164 KB |
最終ジャッジ日時 | 2024-12-20 21:38:24 |
合計ジャッジ時間 | 4,054 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 WA * 33 |
ソースコード
D = int(input())C = input()C = C + input()N = [0]for i, c in enumerate(C, start=1):if c == "x":N.append(i)N.append(15)ans = 0if len(N) - 2 - D <= 0:print(14)exit()for i in range(len(N) - D - 1):ans = max(ans, N[i + D + 1] - N[i] - 1)print(ans)