the XOR total array define bitwise XOR element 0 array emptyfor example XOR total array 256 2 xor 5 xor 6 1given array num return sum XOR total subset num Note Subsets element count multiple timesan array subset array b obtain b delete possibly zero element b example 1input num 13output 6explanation the 4 subset 13 the subset XOR total 0 1 xor total 1 3 xor total 3 13 xor total 1 xor 3 20 1 3 2 6example 2input num 516output 28explanation the 8 subset 516 the subset XOR total 0 5 xor total 5 1 xor total 1 6 xor total 6 51 XOR total 5 xor 1 4 56 xor total 5 xor 6 3 16 XOR total 1 xor 6 7 516 xor total 5 xor 1 xor 6 20 5 1 6 4 3 7 2 28example 3input num 345678output 480explanation the sum XOR total subset 480 constraints1 numslength 121 numsi 20