hdu 4349
題目大意:
求組合數
思路:已知
又已知
即求取n中1的個數;
#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
int n;
while (~scanf("%d", &n))
{
int cnt = 0;
while (n)
{
if (n & 1)
{
cnt++;
}
n >>= 1;
}
printf("%d\n", (1 << cnt));
}
return 0;
}