AMSGAME1_wrong ans

someone please tell why i am getting wrong answer in following code :
OR please provide me with some test cases with which i could figure out my mistake.

@dkrdharmesh just do some mathematics on paper , you will find that you have to calculate the gcd of all number and this will be your answer .
You can see editorials for more detail .
I can write code if you want , but make sure you are taking this question in wrong way.

@upendra1234-i have gone through the editorial.I know the gcd method ,but i would like to know my mistake so that i can improve on it rather than copying the method of the editorial !

@dkrdharmesh >> You should post this query on the editorial page of the problem here, to gain the attention of the setter and tester. :slight_smile: Closing this thread.

This doesn’t answer the OP’s question. His code is giving right answer for most tests. Don’t simply blame, first try to run his code. And please come up with where his code is failing. That would be a better way to answer the question “Why is the code giving WA?” instead of presenting own solution.


someone please help !!