c code of uva problem