結果

問題 No.40 多項式の割り算
ユーザー takakin
提出日時 2020-05-04 11:23:58
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 352 bytes
コンパイル時間 76 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,648 KB
最終ジャッジ日時 2024-06-23 23:56:31
合計ジャッジ時間 2,183 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 3 WA * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=lambda: sys.stdin.readline().rstrip()
d=int(input())
A=[int(i) for i in input().split()][::-1]
a=sum(A)
b=sum(A)-2*sum(A[1::2])
c=A[0]
d1=(a+b)//2-c
d2=(a-b)//2
d3=c
if d1==0 and d2==0 and d3==0:
  print(0)
  print(0)
elif d1==0 and d2==0:
  print(0)
  print(d3)
elif d1==0:
  print(1)
  print(d2,d3)
else:
  print(2)
  print(d1,d2,d3)
0