Here's a Java version of Problem 14. It's faster than Python by not as fast as C.