結果
| 問題 |
No.40 多項式の割り算
|
| コンテスト | |
| ユーザー |
ntuda
|
| 提出日時 | 2024-01-05 12:39:15 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 46 ms / 5,000 ms |
| コード長 | 288 bytes |
| コンパイル時間 | 460 ms |
| コンパイル使用メモリ | 81,972 KB |
| 実行使用メモリ | 62,244 KB |
| 最終ジャッジ日時 | 2024-09-27 19:02:13 |
| 合計ジャッジ時間 | 3,292 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 32 |
ソースコード
D = int(input())
A = list(map(int,input().split()))
if D < 3:
print(D)
print(*A)
exit()
for i in reversed(range(3,D+1)):
A[i-2] += A[i]
A.pop(-1)
i = 2
while i > 0:
if A[i] == 0:
A.pop(-1)
i -= 1
else:
break
print(len(A) - 1)
print(*A)
ntuda