結果

問題 No.40 多項式の割り算
コンテスト
ユーザー matsu7874
提出日時 2015-03-20 06:17:39
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
RE  
実行時間 -
コード長 332 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 757 ms
コンパイル使用メモリ 20,568 KB
実行使用メモリ 20,444 KB
最終ジャッジ日時 2026-03-18 06:57:25
合計ジャッジ時間 5,859 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 31 RE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

D = int(input())
A = [int(x) for x in input().split()]
for i in range(3,D+1)[::-1]:
    A[i-2] += A[i]
if A[2] == 0:
    if A[1] == 0:
        print(0)
        print(A[0])
    else:
        print(1)
        print(''.join(str(item) + ' ' for item in A[0:2]))
else:
    print(2)
    print(''.join(str(item) + ' ' for item in A[0:3]))
0