Available question text
Compute the sum over all positive g of g times the number of strictly increasing subsequences of nums whose GCD equals g (mod 1e9+7). The algorithmic challenge is to count increasing subsequences while dynamically aggregating their gcds efficiently for up to 10^4 elements and values up to 7·10^4, typically via DP/maps that merge gcd states instead of naive enumeration.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 3671. Sum of Beautiful Subsequences
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source