結果
問題 | No.49 算数の宿題 |
ユーザー |
![]() |
提出日時 | 2019-12-10 20:49:43 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 372 bytes |
コンパイル時間 | 110 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-12-23 02:05:08 |
合計ジャッジ時間 | 1,014 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | RE * 10 |
ソースコード
#!/usr/bin/env python3 d = int(input()) c = list(('x' * 14) + input() + input() + ('x' * 14)) ans = 0 for i in range(42 - d + 1): t = c[:] ok = True for j in range(d): if t[i + j] == 'o': ok = False t[i + j] = 'o' if not ok: continue t = ''.join(t) ans = max(ans, max([len(x) for x in t.split('x')])) print(ans)