結果

問題 No.40 多項式の割り算
ユーザー TomoyarnTomoyarn
提出日時 2023-08-26 13:41:01
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 231 bytes
コンパイル時間 312 ms
コンパイル使用メモリ 87,312 KB
実行使用メモリ 79,292 KB
最終ジャッジ日時 2023-08-26 13:41:05
合計ジャッジ時間 4,384 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
70,964 KB
testcase_01 AC 64 ms
71,104 KB
testcase_02 AC 65 ms
70,924 KB
testcase_03 AC 63 ms
70,924 KB
testcase_04 AC 75 ms
75,596 KB
testcase_05 AC 67 ms
75,768 KB
testcase_06 AC 71 ms
75,768 KB
testcase_07 AC 67 ms
75,440 KB
testcase_08 AC 65 ms
70,764 KB
testcase_09 AC 68 ms
75,852 KB
testcase_10 AC 68 ms
75,508 KB
testcase_11 AC 69 ms
75,412 KB
testcase_12 AC 69 ms
75,696 KB
testcase_13 AC 69 ms
75,772 KB
testcase_14 AC 65 ms
75,476 KB
testcase_15 AC 65 ms
75,472 KB
testcase_16 AC 67 ms
75,768 KB
testcase_17 AC 65 ms
75,244 KB
testcase_18 AC 67 ms
75,440 KB
testcase_19 AC 68 ms
75,516 KB
testcase_20 AC 67 ms
75,436 KB
testcase_21 AC 68 ms
75,468 KB
testcase_22 AC 70 ms
75,244 KB
testcase_23 AC 69 ms
75,672 KB
testcase_24 AC 73 ms
75,672 KB
testcase_25 AC 65 ms
70,852 KB
testcase_26 AC 64 ms
70,976 KB
testcase_27 AC 63 ms
71,236 KB
testcase_28 RE -
testcase_29 AC 64 ms
70,992 KB
testcase_30 AC 64 ms
71,020 KB
testcase_31 AC 63 ms
71,144 KB
testcase_32 AC 65 ms
70,972 KB
testcase_33 AC 63 ms
70,972 KB
testcase_34 AC 61 ms
70,964 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

D = int(input())
b = list(map(int, input().split()))
b = b[::-1]
for i in range(D - 2):
    b[i + 2] += b[i]
    b[i] = 0

b = b[::-1][:3]
if b[2] == 0:
    b.pop(-1)
    if b[1] == 0:
        b.pop(-1)
print(len(b) - 1)
print(*b)
0