• + 0 comments

    easy cpp

    long sumXor(long n) {
    int no0=0;
    while(n!=0){
        if(!(n&1))no0++;
        n=n>>1;
    }
    return pow(2,no0);
    }