結果

問題 No.40 多項式の割り算
ユーザー Tomoyarn
提出日時 2023-08-26 13:41:01
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 231 bytes
コンパイル時間 244 ms
コンパイル使用メモリ 81,536 KB
実行使用メモリ 64,512 KB
最終ジャッジ日時 2024-12-25 10:40:19
合計ジャッジ時間 3,003 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 31 RE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

D = int(input())
b = list(map(int, input().split()))
b = b[::-1]
for i in range(D - 2):
    b[i + 2] += b[i]
    b[i] = 0

b = b[::-1][:3]
if b[2] == 0:
    b.pop(-1)
    if b[1] == 0:
        b.pop(-1)
print(len(b) - 1)
print(*b)
0