Lowest Bit

版权声明:菜鸟一枚~~ 有想法可在下面评论, 转载标明出处即可。 https://blog.csdn.net/KLFTESPACE/article/details/87784635
#include<iostream>
#include <cstdio>
#include <algorithm>

using namespace std;

int lowbit(int x){
    return x&-x;
}

int main()
{
    int x;

    while(cin >> x && x){
        int t = lowbit(x);
        cout << t << endl;
    }


    return 0;
}

猜你喜欢

转载自blog.csdn.net/KLFTESPACE/article/details/87784635
BIT