結果
問題 | No.40 多項式の割り算 |
ユーザー |
![]() |
提出日時 | 2021-12-03 23:39:48 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 248 bytes |
コンパイル時間 | 97 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,520 KB |
最終ジャッジ日時 | 2024-07-06 07:08:50 |
合計ジャッジ時間 | 2,009 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 2 |
other | WA * 32 |
ソースコード
D=int(input())A=list(map(int,input().split()))for i in range(D-1):if A[i]!=0:A[i+2]+=A[i]A[i]=0A=A[::-1]while len(A)>0 and A[-1]==0:A.pop()A=A[::-1]print(len(A))if len(A)==0:print(0)else:print(*A)