C++ code of Sums in Traingle problem. Giving Wrong Answer.

http://www.codechef.com/viewsolution/3437635