結果

問題 No.40 多項式の割り算
ユーザー yuki2006
提出日時 2014-10-14 21:36:28
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 307 bytes
コンパイル時間 324 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 7,040 KB
最終ジャッジ日時 2024-12-30 09:07:19
合計ジャッジ時間 1,967 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 1 WA * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

D = int(raw_input())
b = map(int, raw_input().split())

for a in xrange(D - 1):
    b[a + 2] += b[a]
    b[a] = 0

while len(b)>0:
    if b[0] == 0:
        del b[0]
    else:
        break

if len(b) == 0:
    print 0
    print 0
else:
    print len(b) - 1
    print " ".join(map(str, b))
0