結果

問題 No.40 多項式の割り算
ユーザー Kude
提出日時 2020-09-06 03:13:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 48 ms / 5,000 ms
コード長 207 bytes
コンパイル時間 336 ms
コンパイル使用メモリ 81,664 KB
実行使用メモリ 60,416 KB
最終ジャッジ日時 2024-11-29 06:30:16
合計ジャッジ時間 3,202 ms
ジャッジサーバーID
(参考情報)
judge3 / 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]
a = a[:3]
while a and a[-1] == 0:
    a.pop()
if not a:
    a.append(0)
d2 = len(a) - 1
print(d2)
print(*a)
0