Codeforces
CF Step
Youtube Linkedin Discord Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Editorial

Modulo Trick to Clear All Higher Order Bits

Trick

x % 2^b clears all set bits whose indices are >= bit.