結果

問題 No.40 多項式の割り算
ユーザー zimphazimpha
提出日時 2017-12-13 22:49:12
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 84 ms / 5,000 ms
コード長 290 bytes
コンパイル時間 275 ms
コンパイル使用メモリ 87,156 KB
実行使用メモリ 76,536 KB
最終ジャッジ日時 2023-08-21 02:23:46
合計ジャッジ時間 4,807 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,568 KB
testcase_01 AC 75 ms
71,256 KB
testcase_02 AC 76 ms
71,348 KB
testcase_03 AC 74 ms
71,208 KB
testcase_04 AC 84 ms
76,248 KB
testcase_05 AC 80 ms
76,224 KB
testcase_06 AC 79 ms
76,448 KB
testcase_07 AC 80 ms
76,536 KB
testcase_08 AC 74 ms
71,572 KB
testcase_09 AC 80 ms
76,276 KB
testcase_10 AC 81 ms
76,156 KB
testcase_11 AC 78 ms
76,304 KB
testcase_12 AC 78 ms
76,140 KB
testcase_13 AC 79 ms
76,100 KB
testcase_14 AC 80 ms
76,060 KB
testcase_15 AC 81 ms
76,360 KB
testcase_16 AC 80 ms
76,148 KB
testcase_17 AC 79 ms
76,296 KB
testcase_18 AC 80 ms
76,204 KB
testcase_19 AC 80 ms
76,008 KB
testcase_20 AC 79 ms
76,220 KB
testcase_21 AC 80 ms
76,184 KB
testcase_22 AC 79 ms
76,148 KB
testcase_23 AC 79 ms
76,136 KB
testcase_24 AC 80 ms
76,152 KB
testcase_25 AC 74 ms
71,052 KB
testcase_26 AC 74 ms
71,348 KB
testcase_27 AC 74 ms
71,368 KB
testcase_28 AC 76 ms
71,272 KB
testcase_29 AC 76 ms
71,252 KB
testcase_30 AC 76 ms
71,372 KB
testcase_31 AC 75 ms
71,372 KB
testcase_32 AC 74 ms
71,336 KB
testcase_33 AC 75 ms
71,416 KB
testcase_34 AC 76 ms
71,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

d = int(input())
a = list(map(int, input().split()))

for i in range(d, 2, -1):
  a[i - 2] += a[i]

d = min(2, d)
for i in range(d, -1, -1):
  d = i
  if a[i]: break
print(d)
for i in range(d + 1):
  if i == 0:
    print(str(a[i]), end='')
  else:
    print(' ' + str(a[i]), end='')
print()
0