Solution to Problem number 8

Does take a while to run, using Jruby does make it a bit faster. On MRI
may take around 30 minutes.