hdu 1196(位运算)

/*
  Name: 位运算应用 
  Copyright: 
  Author: Try_86
  Date: 12/04/12 22:24
  Description: 
*/


#include <cstdio>
#include <iostream>

using namespace std;

int main() {
    int a;
    while (scanf("%d", &a), a) printf ("%d\n", a&(a^(a-1)));
    return 0;
}

 

posted on 2012-04-12 22:27  Try86  阅读(153)  评论(0)    收藏  举报