結果

問題 No.40 多項式の割り算
ユーザー ssmkzk
提出日時 2018-10-19 01:53:21
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 37 ms / 5,000 ms
コード長 359 bytes
コンパイル時間 117 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,392 KB
最終ジャッジ日時 2024-11-07 22:30:22
合計ジャッジ時間 2,349 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 32
権限があれば一括ダウンロードができます

ソースコード

diff #

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

while len(l) > 3:
    l[-3] += l[-1]
    l.pop()

if len(l) < 3:
    print(0)
    print(l[0])
else:
    if l[2] != 0:
        print(2)
        print(l[0],l[1],l[2])
    else:
        if l[1] != 0:
            print(1)
            print(l[0],l[1])
        else:
            print(0)
            print(l[0])
0