用highbit()函数依次获取数的最高位1代表的数秒了
查看原帖
用highbit()函数依次获取数的最高位1代表的数秒了
1042799
heyonghong楼主2024/11/22 18:02

int highbit(int a) { int prev, curr; prev = a; curr = a; while(curr) { prev = curr; curr &= prev - 1; } return prev; }

2024/11/22 18:02
加载中...