https://www.codechef.com/problems/GCD2/

someone please help me write the solution for this problem .please provide a solution with explanation… please

someone please help me write the solution for this problem .please provide a solution with explanation… please