You are given two integers, k and x.
The price of a positive integer num is defined as the number of set bits (bits with value x. That is, a bit at position num if and only if
Return the maximum integer num such that the sum of the prices of all integers from num is less than or equal to k.
Constraints:
k
x
You are given two integers, k and x.
The price of a positive integer num is defined as the number of set bits (bits with value x. That is, a bit at position num if and only if
Return the maximum integer num such that the sum of the prices of all integers from num is less than or equal to k.
Constraints:
k
x