Problem 10

was not optimized