#include #include #include #include #include #include #include #define maxsize 100000 long int sumOfGroup(int k) { // Return the sum of the elements of the k'th group. long int index=0,sum=0,j,count; long int arr[maxsize],i; for(i=1,j=0;i<=100000;i++) { if(i%2!=0) { arr[j]=i; j++; } } //To find the starting index for k for(i=(k-1);i>=0;) { index=index+i; i=i-1; } //To find the sum of the numbers in that group for(i=index,count=0;count