Sponsored
Use these hints if you're stuck. Try solving on your own first.
Ask <code>2<sup>i</sup></code> for <code>0 <= i < 30</code>.
If the result is greater than zero for some <code>i</code>, this bit is a set bit in <code>n</code>.
Solve with full IDE support and test cases