adding problem 12

This really needs to be faster, but it did, technically, get the right
answer eventually