11340 UVa Solution