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