Given an integer array nums of length n, you can perform the following operation any number of times.
In one move, choose exactly nums and increment each chosen element by
Return the minimum number of moves required to make all elements in nums equal.
Note: The result is guaranteed to fit in a
bit integer.
Constraints:
n == nums.length
nums.length
nums[i]
Given an integer array nums of length n, you can perform the following operation any number of times.
In one move, choose exactly nums and increment each chosen element by
Return the minimum number of moves required to make all elements in nums equal.
Note: The result is guaranteed to fit in a
bit integer.
Constraints:
n == nums.length
nums.length
nums[i]