結果
問題 | No.40 多項式の割り算 |
ユーザー |
|
提出日時 | 2020-04-21 18:50:49 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 37 ms / 5,000 ms |
コード長 | 263 bytes |
コンパイル時間 | 475 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 11,392 KB |
最終ジャッジ日時 | 2024-10-08 22:28:42 |
合計ジャッジ時間 | 2,863 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 32 |
ソースコード
from sys import exit D = int(input()) A = list(map(int, input().split())) if D <= 2: print(D) print(*A) exit() for i in range(D, 2, -1): A[i - 2] += A[i] A[i] = 0 Dd = 2 while not A[Dd] and Dd > 0: Dd -= 1 print(Dd) print(*A[:Dd + 1])