Added solution to UVa 424 using Java.