The solutions seem wrong


#1

all the solutions in the last loop say sum < countOfOne

Consider this case 1110111