How is this wrong? Please Help! (GCDOPS)

My logic is exactly same as discussed in the editorial but it’s not passing any testcases. Please tell where am I going wrong.
https://www.codechef.com/viewsolution/38210959

first take input of all array elements and then perform operations.

1 Like

Thanks a lot! It worked.

1 Like