結果

問題 No.40 多項式の割り算
ユーザー Konton7Konton7
提出日時 2019-05-16 00:50:16
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
WA  
実行時間 -
コード長 352 bytes
コンパイル時間 268 ms
コンパイル使用メモリ 10,668 KB
実行使用メモリ 9,032 KB
最終ジャッジ日時 2023-10-12 20:32:54
合計ジャッジ時間 2,589 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 15 ms
7,820 KB
testcase_02 AC 16 ms
7,824 KB
testcase_03 AC 16 ms
7,816 KB
testcase_04 AC 20 ms
8,588 KB
testcase_05 AC 22 ms
8,840 KB
testcase_06 AC 23 ms
8,916 KB
testcase_07 AC 24 ms
8,956 KB
testcase_08 AC 16 ms
7,748 KB
testcase_09 AC 21 ms
8,624 KB
testcase_10 AC 23 ms
8,988 KB
testcase_11 AC 20 ms
8,576 KB
testcase_12 AC 18 ms
8,184 KB
testcase_13 AC 23 ms
8,956 KB
testcase_14 AC 20 ms
8,528 KB
testcase_15 AC 21 ms
8,636 KB
testcase_16 AC 23 ms
9,000 KB
testcase_17 AC 17 ms
8,344 KB
testcase_18 AC 23 ms
8,876 KB
testcase_19 AC 24 ms
9,032 KB
testcase_20 AC 20 ms
8,596 KB
testcase_21 AC 18 ms
8,144 KB
testcase_22 AC 17 ms
8,328 KB
testcase_23 AC 19 ms
8,564 KB
testcase_24 AC 21 ms
8,780 KB
testcase_25 AC 16 ms
7,796 KB
testcase_26 AC 16 ms
7,796 KB
testcase_27 AC 16 ms
7,820 KB
testcase_28 AC 15 ms
7,744 KB
testcase_29 AC 16 ms
7,800 KB
testcase_30 AC 16 ms
7,796 KB
testcase_31 AC 16 ms
7,936 KB
testcase_32 AC 16 ms
7,872 KB
testcase_33 AC 16 ms
7,848 KB
testcase_34 AC 16 ms
7,848 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
coordinate = [ int(v) for v in input().split() ][::-1]



for i in range(n-2):
    coordinate[i+2] += coordinate[i]
    coordinate[i] = 0

zero = 0
for i in range(n):
    if coordinate[i] == 0:
        zero += 1
coordinate = [ str(i) for i in coordinate ]

s = " ".join(coordinate[zero:][::-1])
print(len(coordinate[zero:])-1)
print(s)
0