Update uva895.cpp