@[zouyili2468](/user/962853)
hack数据:
>
> 2
>
> 1 1 1
>
> 正确结果:
>
> x^2+x+1
>
> 你的程序输出的答案:
>
> x^2+x^1+1
如果指数为1时只需输出x,你的代码里没有判断这种情况,只需在35行,也就是```cout<<"^"<<t; //输出指数```这行改为:```if(t!=1)cout<<"^"<<t;```即可[AC](https://www.luogu.com.cn/record/122617657)
by Lyrith_with_xQ @ 2023-08-24 21:28:33
谢谢大佬!
by zouyili2468 @ 2023-08-26 14:38:00