結果

問題 No.40 多項式の割り算
ユーザー tnodino
提出日時 2022-02-19 07:12:49
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 34 ms / 5,000 ms
コード長 174 bytes
コンパイル時間 87 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,392 KB
最終ジャッジ日時 2024-06-29 10:14:18
合計ジャッジ時間 2,132 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 32
権限があれば一括ダウンロードができます

ソースコード

diff #

D = int(input())
a = list(map(int,input().split()))
for i in range(D,2,-1):
    a[i-2] += a[i]
k = min(len(a)-1, 2)
while k and a[k] == 0:
    k -= 1
print(k)
print(*a[:k+1])
0