Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
It is optimal always to take the smallest possible integer you can choose.
Between every consecutive banned integers, can you find how many integers you can choose?
Think of using binary search to find that.