← Questions
Maximize the bitwise AND of k elements with an increment budget
0
I was asked this
No reports yet. Sign in to say where you were asked it.
You get an array of non-negative integers, an integer k and a budget c. You may add amounts to elements as long as the total added over all elements is at most c. Then choose k elements. Return the largest possible bitwise AND of the chosen elements.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
