Fixed up a bunch of PE problems.

The solutions are still brute force, but the code is more pythonic. This was
really just an excuse to practice typing with dvorak.