UVA 10717 java version