Number of subsets with GCD equal to ' i ' is pow ( 2 , add ) - 1 - sub
subsets [ i ] = ( 1 << add ) - 1 - sub ; } for ( int i = 0 ; i < m ; i ++ ) cout << " Number ▁ of ▁ subsets ▁ with ▁ gcd ▁ " << gcd [ i ] << " ▁ is ▁ " << subsets [ gcd [ i ] ] << endl ; }