Wrong answer for tester's solution in July long contest farasa-editorial

I was reading the Farasa Editorial to learn more about FFT n the code written in the tester’s solution. I copied method3 n FFT method n submitted I got wrong answer … Anyway after 2 wrong answers submissions I decided to submit the tester’s solution n I got wrong answer. Can anyone clarify to me why the tester’s solution is giving wrong answer?

//