結果

問題 No.40 多項式の割り算
ユーザー ciirociiro
提出日時 2021-12-14 00:45:55
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 307 bytes
コンパイル時間 444 ms
コンパイル使用メモリ 10,700 KB
実行使用メモリ 9,112 KB
最終ジャッジ日時 2023-09-30 06:49:26
合計ジャッジ時間 2,558 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,728 KB
testcase_01 AC 16 ms
7,784 KB
testcase_02 AC 16 ms
7,720 KB
testcase_03 AC 15 ms
7,720 KB
testcase_04 AC 20 ms
8,536 KB
testcase_05 AC 21 ms
8,688 KB
testcase_06 AC 23 ms
9,012 KB
testcase_07 AC 23 ms
8,992 KB
testcase_08 AC 16 ms
7,648 KB
testcase_09 AC 21 ms
8,756 KB
testcase_10 AC 23 ms
8,880 KB
testcase_11 AC 19 ms
8,648 KB
testcase_12 AC 18 ms
8,516 KB
testcase_13 AC 25 ms
8,944 KB
testcase_14 AC 20 ms
8,736 KB
testcase_15 AC 21 ms
8,568 KB
testcase_16 AC 22 ms
8,784 KB
testcase_17 AC 18 ms
8,320 KB
testcase_18 AC 22 ms
8,804 KB
testcase_19 AC 23 ms
9,112 KB
testcase_20 AC 19 ms
8,532 KB
testcase_21 AC 17 ms
8,220 KB
testcase_22 AC 17 ms
8,228 KB
testcase_23 AC 19 ms
8,520 KB
testcase_24 AC 22 ms
8,840 KB
testcase_25 AC 16 ms
7,740 KB
testcase_26 AC 16 ms
7,928 KB
testcase_27 AC 16 ms
7,780 KB
testcase_28 RE -
testcase_29 AC 15 ms
7,652 KB
testcase_30 AC 16 ms
7,724 KB
testcase_31 AC 16 ms
7,952 KB
testcase_32 AC 16 ms
7,728 KB
testcase_33 AC 16 ms
7,784 KB
testcase_34 AC 16 ms
7,892 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

d = int(input())
a = list(map(int,input().split()))
for i in range(d + 1):
	if a[d - i] != 0:
		n = d - i
		if n < 3:
			break
		a[n - 2] += a[n]
		a[n] = 0

for i in range(3):
	if a[2 - i] != 0:
		dd = 2 - i
		a = a[:dd + 1]
		break
	if 2 - i == 0:
		dd = 0
		a = [0]

print(dd)
print(" ".join(map(str,a)))
0