uva-1456.cpp Accepted and Described