(x+1)(x+1)(x+2)=0
=>(x^2 + 2x + 1)(x+2) = 0
=>x^3 + 4x^2 + 5x + 6 = 0
然後輸出
解答
https://66lemon66.blogspot.com/2021/03/zerojudge-d437-10326-polynomial.html