You are given a queries, where queries[i] = [l, r].
For each query, an array nums is formed containing consecutive integers from l to r inclusive, such that nums
In a single operation, you can select two distinct indices i and j where nums[i] > 0 and nums[j] > 0, and simultaneously replace nums[i] with nums[j] with
Return the sum of the minimum number of operations required to reduce all elements of nums to
Constraints:
queries.length
queries[i].length
queries[i]
You are given a queries, where queries[i] = [l, r].
For each query, an array nums is formed containing consecutive integers from l to r inclusive, such that nums
In a single operation, you can select two distinct indices i and j where nums[i] > 0 and nums[j] > 0, and simultaneously replace nums[i] with nums[j] with
Return the sum of the minimum number of operations required to reduce all elements of nums to
Constraints:
queries.length
queries[i].length
queries[i]