結果

問題 No.40 多項式の割り算
ユーザー あかりきあかりき
提出日時 2021-02-08 10:13:47
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 322 bytes
コンパイル時間 479 ms
コンパイル使用メモリ 87,140 KB
実行使用メモリ 79,220 KB
最終ジャッジ日時 2023-09-18 15:59:07
合計ジャッジ時間 4,639 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 74 ms
71,296 KB
testcase_02 AC 73 ms
71,344 KB
testcase_03 AC 75 ms
71,380 KB
testcase_04 WA -
testcase_05 AC 82 ms
76,464 KB
testcase_06 AC 82 ms
76,396 KB
testcase_07 AC 81 ms
76,476 KB
testcase_08 AC 80 ms
76,372 KB
testcase_09 AC 83 ms
76,464 KB
testcase_10 AC 83 ms
76,472 KB
testcase_11 AC 81 ms
76,392 KB
testcase_12 AC 81 ms
76,252 KB
testcase_13 AC 82 ms
76,560 KB
testcase_14 AC 83 ms
76,484 KB
testcase_15 AC 80 ms
76,412 KB
testcase_16 AC 82 ms
76,412 KB
testcase_17 AC 81 ms
76,532 KB
testcase_18 AC 83 ms
76,484 KB
testcase_19 AC 82 ms
76,532 KB
testcase_20 AC 82 ms
76,468 KB
testcase_21 AC 82 ms
76,304 KB
testcase_22 AC 81 ms
76,872 KB
testcase_23 AC 84 ms
76,212 KB
testcase_24 AC 82 ms
76,552 KB
testcase_25 AC 76 ms
71,380 KB
testcase_26 AC 76 ms
71,416 KB
testcase_27 AC 75 ms
71,440 KB
testcase_28 RE -
testcase_29 AC 75 ms
71,564 KB
testcase_30 AC 77 ms
71,072 KB
testcase_31 AC 76 ms
71,512 KB
testcase_32 RE -
testcase_33 AC 74 ms
71,408 KB
testcase_34 AC 75 ms
71,120 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

d=int(input())
a=list(map(int,input().split()))
a.reverse()
b=[1,0,-1,0]
for i in range(d-2):
  x=a[i]
  for j in range(4):
    a[i+j]-=x*b[j]
ans=[]
a.reverse()
for i in range(5):
  if a[i]==0:
    d2=i-1
    break
  else:
    ans.append(str(a[i]))
if d2==-1:
  print(0)
  print(0)
  exit()
print(d2)
print(' '.join(ans))
0