I have used the built-in gcd. Still got WA till I was using int to get GCD & LCM. My code provides correct answers up to the limit. After using long long it got accepted. I don’t understand why I got WA if it was giving correct answers up to the limits. Can somebody explain? @anon46046035, @anumber have a look.

GCD Problem: gcd & lcm

WA solution: using int

AC solution: using long long