Leetcode 3658. GCD of Odd and Even Sums
Find the GCD of the sum of the first n odd numbers and the sum of the first n even numbers. Use the arithmetic-series identities sumOdd = n^2 and sumEven = n(n+1) to reduce the problem via gcd properties (result = n).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Your account is free and you can post anonymously if you choose.