Please suggest a test case where this solution is going wrong ??

Hello
Please suggest a test case where this solution is going wrong ??
https://www.codechef.com/viewsolution/15050714

Thanks

What if ans[x] = 0 for multiple x not equal to 1? Then some of the terms which you output may be of the wrong sign.

//