結果

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

ソースコード

diff #

import sys
input=lambda: sys.stdin.readline().rstrip()
d=int(input())
A=[int(i) for i in input().split()]
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