結果
問題 |
No.204 ゴールデン・ウィーク(2)
|
ユーザー |
|
提出日時 | 2023-05-01 07:45:47 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 298 bytes |
コンパイル時間 | 175 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-11-20 08:48:38 |
合計ジャッジ時間 | 3,240 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 16 WA * 30 |
ソースコード
d = int(input()) s = 'x' * d for _ in range(2): s += input() s += 'x' * d ans = 0 n = len(s) for i in range(n): j = i x = 0 while j < n: if s[j] == 'x': x += 1 if x == d + 1: break j += 1 ans = max(ans, j - i) print(ans)