結果

問題 No.40 多項式の割り算
ユーザー kutsutamakutsutama
提出日時 2018-03-18 00:01:52
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 255 bytes
コンパイル時間 95 ms
コンパイル使用メモリ 10,528 KB
実行使用メモリ 9,020 KB
最終ジャッジ日時 2023-08-25 17:03:07
合計ジャッジ時間 2,126 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 16 ms
7,784 KB
testcase_02 AC 16 ms
7,792 KB
testcase_03 AC 16 ms
7,756 KB
testcase_04 AC 19 ms
8,568 KB
testcase_05 WA -
testcase_06 AC 22 ms
8,904 KB
testcase_07 AC 21 ms
8,988 KB
testcase_08 AC 15 ms
7,796 KB
testcase_09 AC 19 ms
8,624 KB
testcase_10 AC 21 ms
8,852 KB
testcase_11 AC 18 ms
8,476 KB
testcase_12 WA -
testcase_13 AC 21 ms
9,020 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 21 ms
8,880 KB
testcase_17 AC 17 ms
8,224 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 17 ms
8,308 KB
testcase_22 AC 17 ms
8,292 KB
testcase_23 AC 18 ms
8,540 KB
testcase_24 WA -
testcase_25 AC 15 ms
7,832 KB
testcase_26 AC 15 ms
7,836 KB
testcase_27 WA -
testcase_28 RE -
testcase_29 AC 16 ms
7,804 KB
testcase_30 AC 15 ms
7,768 KB
testcase_31 AC 15 ms
7,928 KB
testcase_32 RE -
testcase_33 WA -
testcase_34 AC 16 ms
7,740 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

d = int(input())
a = [int(x) for x in input().split()]

for i in reversed(range(3, len(a))):
    a[i - 2] += a[i]
    a[i] = 0

dd = 0
for i in range(4):
    if a[i] > 0:
        dd = i
print(dd)
print(' '.join([str(x) for x in a[:dd + 1]]))
0