prob 41 initial attempt
prob 41 solved
prob 41 optimized and resolved