HDU-1196(lowest bit)

来源:互联网 发布:linux新建配置conf文件 编辑:程序博客网 时间:2024/04/29 18:25
题目链接: https://vjudge.net/problem/HDU-1196
#include <cstdio>#include <iostream>using namespace std;int lowbit(int x){    return x&-x;}int main(){    int n;    while(scanf("%d", &n) != EOF && n)        printf("%d\n", lowbit(n));}
原创粉丝点击