結果

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

ソースコード

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(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