Divisible Group Sums - UVA Solution