C++编程之美-数字之魅(代码清单2-7)

代码清单2-7

int lowestOne(int N)
{
     int Ret = 0;
     while(N)
     {
          N >>= 1;
          Ret += N;
     }
     return Ret;
}
发布了1210 篇原创文章 · 获赞 951 · 访问量 7万+

猜你喜欢

转载自blog.csdn.net/weixin_42528266/article/details/104027411
今日推荐