Check whether j - th bit is set bit or not
if ( i & ( 1 << j ) ) : NEW_LINE INDENT d *= v [ j ] NEW_LINE count += 1 NEW_LINE DEDENT if ( count & 1 ) : NEW_LINE odd += n // d NEW_LINE else : NEW_LINE even += n // d NEW_LINE return ( odd - even ) NEW_LINE