@darkshadows, @rustinpiece I know it wont be possible to re-judge the solutions considering the contest is already over but if possible please improve them for practice section.
Updated test case. Thanks @yash_15 for pointing out that I missed number of elements
Hey, really sorry this happened. I have updated the testcases now. Apparently SUBGCD being the easiest problem, we mistakenly didn’t pay the required amount of attention towards testing it.