結果

問題 No.40 多項式の割り算
ユーザー roiti46roiti46
提出日時 2015-02-09 22:52:07
言語 Python2
(2.7.18)
結果
AC  
実行時間 18 ms / 5,000 ms
コード長 240 bytes
コンパイル時間 42 ms
コンパイル使用メモリ 6,468 KB
実行使用メモリ 6,696 KB
最終ジャッジ日時 2023-09-05 21:29:04
合計ジャッジ時間 1,785 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
5,960 KB
testcase_01 AC 10 ms
6,036 KB
testcase_02 AC 11 ms
5,976 KB
testcase_03 AC 11 ms
5,892 KB
testcase_04 AC 15 ms
6,256 KB
testcase_05 AC 16 ms
6,396 KB
testcase_06 AC 17 ms
6,484 KB
testcase_07 AC 18 ms
6,624 KB
testcase_08 AC 11 ms
5,832 KB
testcase_09 AC 15 ms
6,356 KB
testcase_10 AC 17 ms
6,652 KB
testcase_11 AC 14 ms
6,260 KB
testcase_12 AC 13 ms
6,152 KB
testcase_13 AC 17 ms
6,696 KB
testcase_14 AC 15 ms
6,312 KB
testcase_15 AC 14 ms
6,292 KB
testcase_16 AC 17 ms
6,540 KB
testcase_17 AC 12 ms
6,188 KB
testcase_18 AC 17 ms
6,476 KB
testcase_19 AC 18 ms
6,552 KB
testcase_20 AC 14 ms
6,312 KB
testcase_21 AC 12 ms
6,136 KB
testcase_22 AC 12 ms
6,004 KB
testcase_23 AC 14 ms
6,300 KB
testcase_24 AC 16 ms
6,396 KB
testcase_25 AC 11 ms
5,820 KB
testcase_26 AC 11 ms
5,844 KB
testcase_27 AC 11 ms
5,816 KB
testcase_28 AC 11 ms
5,892 KB
testcase_29 AC 11 ms
6,048 KB
testcase_30 AC 11 ms
6,044 KB
testcase_31 AC 10 ms
5,816 KB
testcase_32 AC 10 ms
5,892 KB
testcase_33 AC 11 ms
5,816 KB
testcase_34 AC 10 ms
5,980 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

D = int(raw_input())
b = map(int,raw_input().split())
for i in range(3,D+1)[::-1]:
    b[i-2] += b[i]
    b[i] = 0
for i in range(D+1)[::-1]:
    if b[i] != 0 or i == 0:
        print i
        print " ".join(map(str,b[:i+1]))
        break
0