solve uva 116, 119