From ( i + 1 ) th bit , all bits of L changed to be 1
v1 [ i ] = 1 NEW_LINE for i in range ( len ( v2 ) ) : NEW_LINE v3 . append ( v2 [ i ] v1 [ i ] ) NEW_LINE for i in range ( len ( v2 ) ) : NEW_LINE if ( v3 [ i ] == 1 ) : NEW_LINE ans += cnt NEW_LINE cnt *= 2 NEW_LINE return ans NEW_LINE