You could try tricks by doing things like separating odd and even numbers or providing a set amount of tries (eg : use only 5 pluses, or at least more than 3 pluses, reducing the overall loop). You could also break the loop as soon as you find a combination, or first organize the list, but yeahit's going to be complicated.