結果
問題 |
No.40 多項式の割り算
|
ユーザー |
![]() |
提出日時 | 2014-11-24 02:21:29 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 348 bytes |
コンパイル時間 | 248 ms |
コンパイル使用メモリ | 12,288 KB |
実行使用メモリ | 11,136 KB |
最終ジャッジ日時 | 2025-01-02 21:06:31 |
合計ジャッジ時間 | 2,511 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 2 |
other | WA * 32 |
ソースコード
import itertools as it d = int(input()) a_list = list(map(int, input().split())) a_list.reverse() for i in range(len(a_list) - 3): a_list[i+2] += a_list[i] result = list(it.dropwhile(lambda x: x == 0, a_list[-3:])) result.reverse() print(len(result)) if len(result) == 0: result = [0,] print(" ".join(map(str, result)))