#include #include #include #include #include #include #include long int sumOfGroup(long k) { // Return the sum of the elements of the k'th group. long sum,i,sum_next,sum_prev; sum=(k*k)-(k-1); sum_next=sum; for(i=1;i