```function NumberOf1(n)
{
    // write code here
    // https://www.cnblogs.com/skillking/p/9930095.html   
    let num = 0;
    while(n){
        num++;
        n = n & (n - 1) //此公式可以消除最右边的1
    }
    return num
}
module.exports = {
    NumberOf1 : NumberOf1
};