• + 0 comments
    ** Does anyone know why below code give wrong answer on some test cases**

    public static long sumOfGroup(int k) {

     long ele=(k*(k-1))+1;
    long sum=(k*(2*ele+(k-1)*2))/2;
    return sum;
    
    
    
    }