Update UVa 11562.cpp