Problem 3954 · Easy

Sum of Compatible Numbers in Range I

Only numbers within k of n can be compatible, so scan that window and add the ones with no shared set bit with n.

Open the interactive visualisation