You are given an integer array nums.
A subsequence of nums is called beautiful if it is strictly increasing. The beauty of a non empty strictly increasing subsequence is defined as the greatest common divisor (GCD) of all its elements.
Return the total sum of the beauty across all non empty strictly increasing subsequences of nums.
Constraints:
nums.length
nums[i]
You are given an integer array nums.
A subsequence of nums is called beautiful if it is strictly increasing. The beauty of a non empty strictly increasing subsequence is defined as the greatest common divisor (GCD) of all its elements.
Return the total sum of the beauty across all non empty strictly increasing subsequences of nums.
Constraints:
nums.length
nums[i]