标签:one important 进制 tco div reverse return none pre
uint32_t reverseBits(uint32_t n) {
int arr[32] = {0};
int i=0;
while(n)
{
arr[i++] = n % 2;
n /= 2;
}
for(i=0; i<32; i++)
{
n += (arr[i])? pow(2,32-1-i): 0;
}
return n;
}
标签:one important 进制 tco div reverse return none pre
原文地址:https://www.cnblogs.com/ganxiang/p/13630031.html