Add the solution of the 4th problem.
Delete an useless variable.
Optimize several algos for the tests of the multiples