Help me in solving KDELI problem

My issue

where my code is fail

My code

/* package codechef; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Codechef
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here .//
		Scanner sc=new Scanner(System.in);
		int A=sc.nextInt();
		while(A-->0){
		    int B=sc.nextInt();
		    int C=sc.nextInt();
		    int D=sc.nextInt();
		    int Arry[]=new int[B];
		    for (int i=0;i<B;i++){
		        Arry[i]=sc.nextInt();
		    }
		    Arrays.sort(Arry);
		    int sum=0;
		    for (int i=B-D;i>=0;i-=C){
		        sum+=Arry[i];
		    }
		    System.out.println(sum);
		    
		}
	}
}

Problem Link: KDELI Problem - CodeChef

@choudharyjayan
use long in sum to avoid integer overflow.