sums in a triangle codechef solution