Given an array of integers and multiple queries representing index ranges [L, R], calculate the cumulative sum of the Greatest Common Divisor (GCD) for all specified ranges.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.