結果

問題 No.40 多項式の割り算
ユーザー tookunn_1213
提出日時 2016-06-20 22:14:02
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 256 bytes
コンパイル時間 517 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,520 KB
最終ジャッジ日時 2024-10-11 17:55:35
合計ジャッジ時間 2,626 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 2 WA * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

D = int(input())
a = [int(i) for i in input().split()]
for i in range(D,3,-1):
	a[i - 2] += a[i]
	a[i] = 0
ans = 0
if len(a) >= 3 and a[2] > 0:
	ans = 2
elif len(a) >= 2 and a[1] > 0:
	ans = 1
print(ans)
print(' '.join([str(a[i]) for i in range(ans + 1)]))
0