Working problem 76. The code is a little goofy, but it works pretty freaking fast. Using globals, so that's no fun.