摘要: 方式1 int mask = num; mask |= mask >> 1; mask |= mask >> 2; mask |= mask >> 4; mask |= mask >> 8; mask |= mask >> 16; 经过5次移位和异或操作,即使1在最左处,也可以覆盖整个序列 示例: 阅读全文
posted @ 2021-10-18 13:16 oumae 阅读(38) 评论(0) 推荐(1) 编辑