結果

問題 No.40 多項式の割り算
ユーザー rocoder
提出日時 2017-08-02 07:13:11
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 39 ms / 5,000 ms
コード長 263 bytes
コンパイル時間 195 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,520 KB
最終ジャッジ日時 2024-10-11 05:47:54
合計ジャッジ時間 2,636 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 32
権限があれば一括ダウンロードができます

ソースコード

diff #

D=int(input())
a=[int (i) for i in input (). split ()]
while len(a)>3:
    a[-3]+=a[-1]
    a.pop(-1)
 #   print (a)
if a[-1]==0:
    a.pop(2)
    if a[-1]==0:
        a.pop(1) 
i=len(a)-1
b=""
while i>=0:
    b=str(a[i])+" "+b
    i-=1
print (len(a)-1)
print (b)
0