結果

問題 No.40 多項式の割り算
コンテスト
ユーザー maguroguma
提出日時 2017-09-16 14:44:04
言語 Python3
(3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
RE  
実行時間 -
コード長 355 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 54 ms
コンパイル使用メモリ 14,976 KB
実行使用メモリ 13,056 KB
最終ジャッジ日時 2026-09-21 00:20:37
合計ジャッジ時間 2,764 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge4_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 31 RE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

# -*- coding: utf-8 -*-

D = int(input())
a = list(map(int, input().split()))

for i in range(D, 2, -1):
    q = a[i]
    e = i - 3
    a[e+1] += q

d = 2
for i in range(d, -1, -1):
    d = i
    if a[i] != 0:
        break

print(d)
for i in range(d+1):
    if i==0:
        print(str(a[i]), end='')
    else:
        print(' '+str(a[i]), end='')
print()
0