Solution for problem 6.
Correct max factor calculation in problem 3.
Solution for problem 7.
Solution to problem 8