Added solution to Problem 41

Takes a little while to find the solution