結果
| 問題 | No.40 多項式の割り算 | 
| コンテスト | |
| ユーザー |  Konton7 | 
| 提出日時 | 2019-05-16 00:52:46 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 40 ms / 5,000 ms | 
| コード長 | 377 bytes | 
| コンパイル時間 | 320 ms | 
| コンパイル使用メモリ | 12,416 KB | 
| 実行使用メモリ | 11,392 KB | 
| 最終ジャッジ日時 | 2024-09-14 18:58:33 | 
| 合計ジャッジ時間 | 2,506 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 32 | 
ソースコード
n = int(input())
coordinate = [ int(v) for v in input().split() ][::-1]
for i in range(n-2):
    coordinate[i+2] += coordinate[i]
    coordinate[i] = 0
zero = 0
for i in range(n):
    if coordinate[i] == 0:
        zero += 1
    else:
        break
coordinate = [ str(i) for i in coordinate ]
s = " ".join(coordinate[zero:][::-1])
print(len(coordinate[zero:])-1)
print(s)
            
            
            
        