結果

問題 No.40 多項式の割り算
ユーザー JunOnumaJunOnuma
提出日時 2017-06-14 16:24:12
言語 Python2
(2.7.18)
結果
AC  
実行時間 19 ms / 5,000 ms
コード長 213 bytes
コンパイル時間 397 ms
コンパイル使用メモリ 7,184 KB
実行使用メモリ 6,956 KB
最終ジャッジ日時 2023-10-25 01:54:43
合計ジャッジ時間 2,204 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
6,412 KB
testcase_01 AC 11 ms
6,412 KB
testcase_02 AC 11 ms
6,412 KB
testcase_03 AC 11 ms
6,412 KB
testcase_04 AC 16 ms
6,740 KB
testcase_05 AC 17 ms
6,816 KB
testcase_06 AC 18 ms
6,924 KB
testcase_07 AC 19 ms
6,952 KB
testcase_08 AC 11 ms
6,424 KB
testcase_09 AC 16 ms
6,788 KB
testcase_10 AC 18 ms
6,900 KB
testcase_11 AC 15 ms
6,716 KB
testcase_12 AC 13 ms
6,624 KB
testcase_13 AC 18 ms
6,896 KB
testcase_14 AC 16 ms
6,740 KB
testcase_15 AC 16 ms
6,736 KB
testcase_16 AC 18 ms
6,900 KB
testcase_17 AC 13 ms
6,588 KB
testcase_18 AC 18 ms
6,884 KB
testcase_19 AC 19 ms
6,956 KB
testcase_20 AC 15 ms
6,684 KB
testcase_21 AC 13 ms
6,552 KB
testcase_22 AC 12 ms
6,520 KB
testcase_23 AC 14 ms
6,680 KB
testcase_24 AC 16 ms
6,812 KB
testcase_25 AC 11 ms
6,412 KB
testcase_26 AC 11 ms
6,412 KB
testcase_27 AC 11 ms
6,412 KB
testcase_28 AC 11 ms
6,412 KB
testcase_29 AC 11 ms
6,412 KB
testcase_30 AC 11 ms
6,412 KB
testcase_31 AC 11 ms
6,412 KB
testcase_32 AC 11 ms
6,412 KB
testcase_33 AC 11 ms
6,412 KB
testcase_34 AC 11 ms
6,412 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(raw_input())
l = map(int, raw_input().split())
for i in range(n, 2, -1):
    l[i-2] += l[i]
    l[i] = 0
i = n
while i >= 0 and l[i] == 0:
    i -= 1
i = max(i,0)
print i
print ' '.join(map(str, l[:i+1]))
0