Solved problem 51

Or so I think, because Project Euler is currently offline :(