UVa 10600 accepted