Given an integer array nums.
Find the number of pairs of disjoint non empty subsequences (seq1, seq2) of nums such that the greatest common divisor of the elements in seq1 equals the greatest common divisor of the elements in seq2.
Since the answer may be very large, return it modulo
Note:
A subsequence is a sequence that can be derived from another sequence by deleting some or no elements without changing the order of the remaining elements.
Two subsequences are disjoint if their chosen indices in
numsdo not overlap.The greatest common divisor of a sequence of integers is the largest positive integer that divides all elements in the sequence.
Constraints:
nums.length
nums[i]
Given an integer array nums.
Find the number of pairs of disjoint non empty subsequences (seq1, seq2) of nums such that the greatest common divisor of the elements in seq1 equals the greatest common divisor of the elements in seq2.
Since the answer may be very large, return it modulo
Note:
A subsequence is a sequence that can be derived from another sequence by deleting some or no elements without changing the order of the remaining elements.
Two subsequences are disjoint if their chosen indices in
numsdo not overlap.The greatest common divisor of a sequence of integers is the largest positive integer that divides all elements in the sequence.
Constraints:
nums.length
nums[i]