HDU 4349
View Code
1 #include<iostream> 2 #include<cstdio> 3 using namespace std; 4 5 int main() 6 { 7 int n; 8 while (scanf("%d",&n) != EOF) { 9 int cnt(0); 10 while (n) { 11 cnt += (n&1); 12 n >>= 1; 13 } 14 printf("%d\n",(1<<cnt)); 15 } 16 return 0; 17 }