Add solution to problem #45

Added a horrible solution to problem #45.