結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,740 KB
testcase_01 AC 16 ms
7,824 KB
testcase_02 AC 16 ms
7,816 KB
testcase_03 AC 15 ms
7,908 KB
testcase_04 AC 18 ms
8,716 KB
testcase_05 WA -
testcase_06 AC 20 ms
9,024 KB
testcase_07 AC 20 ms
8,976 KB
testcase_08 AC 16 ms
7,904 KB
testcase_09 AC 19 ms
8,788 KB
testcase_10 AC 20 ms
8,956 KB
testcase_11 AC 17 ms
8,488 KB
testcase_12 WA -
testcase_13 AC 20 ms
8,896 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 22 ms
8,916 KB
testcase_17 AC 17 ms
8,196 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 17 ms
8,180 KB
testcase_22 AC 16 ms
8,216 KB
testcase_23 AC 18 ms
8,440 KB
testcase_24 WA -
testcase_25 AC 16 ms
7,824 KB
testcase_26 AC 16 ms
7,776 KB
testcase_27 WA -
testcase_28 AC 16 ms
7,848 KB
testcase_29 AC 15 ms
7,908 KB
testcase_30 AC 15 ms
7,756 KB
testcase_31 AC 15 ms
7,852 KB
testcase_32 WA -
testcase_33 WA -
testcase_34 AC 16 ms
7,820 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(min(4, len(a))):
    if a[i] > 0:
        dd = i
print(dd)
print(' '.join([str(x) for x in a[:dd + 1]]))
0