You are given a nums. In one operation, you can:
Choose two distinct indices i and j in a subarray.
Choose a non negative integer k such that the nums[i] and nums[j] is
Subtract nums[i] and nums[j].
A subarray is defined as beautiful if all of its elements can be transformed to
Return the total number of beautiful subarrays in nums.
Note: A subarray is a contiguous non empty sequence of elements within an array.
Constraints:
nums.length
nums[i]
You are given a nums. In one operation, you can:
Choose two distinct indices i and j in a subarray.
Choose a non negative integer k such that the nums[i] and nums[j] is
Subtract nums[i] and nums[j].
A subarray is defined as beautiful if all of its elements can be transformed to
Return the total number of beautiful subarrays in nums.
Note: A subarray is a contiguous non empty sequence of elements within an array.
Constraints:
nums.length
nums[i]