3658. GCD of Odd and Even Sums
You are given an integer
n. Your task is to compute the GCD (greatest common divisor) of two values:
sumOdd: the sum of the firstnodd numbers.sumEven: the sum of the firstneven numbers.Return the GCD of
sumOddandsumEven.
1 | class Solution { |