exercise 2.41 sum-to-s-triples