correctjust ((num - 1) & num) is enough
((num - 1) ^ num) also can
It's quite practical and quite frequent. It's important to know it, otherwise you don't understand what's going on.
opps ^ is wrong. It's always true.
本帖共有 15 楼,当前显示第 13 楼,本文还有 N-1 层楼,要不你试试看:点击此处阅读更多 >>