結果

問題 No.40 多項式の割り算
ユーザー kutsutama
提出日時 2018-03-18 00:03:47
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 268 bytes
コンパイル時間 153 ms
コンパイル使用メモリ 12,288 KB
実行使用メモリ 11,392 KB
最終ジャッジ日時 2024-12-24 02:20:50
合計ジャッジ時間 2,499 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21 WA * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

d = int(input())
a = [int(x) for x in input().split()]

for i in reversed(range(3, len(a))):
    a[i - 2] += a[i]
    a[i] = 0

dd = 0
for i in range(min(4, len(a))):
    if a[i] > 0:
        dd = i
print(dd)
print(' '.join([str(x) for x in a[:dd + 1]]))
0