Use a Range instead of Array.range for Problem1
Simplify the solution for Problem 12