Solved problem 12

with a dubious algorithm and a 15 minute runtime :(