結果
| 問題 | No.40 多項式の割り算 | 
| コンテスト | |
| ユーザー |  maspy | 
| 提出日時 | 2020-01-27 17:53:32 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 33 ms / 5,000 ms | 
| コード長 | 335 bytes | 
| コンパイル時間 | 305 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 11,520 KB | 
| 最終ジャッジ日時 | 2024-09-14 12:01:37 | 
| 合計ジャッジ時間 | 2,465 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge6 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 32 | 
ソースコード
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
D,*A = map(int,read().split())
A += [0,0,0,0,0]
A[1] += sum(A[3::2])
A[2] += sum(A[4::2])
A = A[:3]
while A and A[-1] == 0:
    A.pop()
if not A:
    print(0)
    print(0)
else:
    print(len(A) - 1)
    print(*A)
            
            
            
        