For this Question: Toros went to the supermarket to buy K items. There were a total of N items. Each item had a distinct price P<sub>i</sub>. He is cost-effective, so he would buy the K cheapest item. But he knows that the more cheaper an item is, the more is the chances that it can be defective. So he planned to ignore 2 cheapest items and buy K from the remaining ones.
Find the total cost of all items that he would buy.The first line contains two integers N and K, denoting the total number of items in the supermarket and the number of items Toros is going to buy.
The second line contains N distinct integers P<sub>i</sub> , denoting the prices of the items

<b>Constraints:</b>
1 <= N <= 100000
1 <= K <= N - 2
1 <= P<sub>i</sub> <= 1000000Print a single integer denoting the total cost of items Toros would buy.Sample Input:
5 2
4 1 2 3 5

Sample Output:
7

Explanation:
Toros will ignore items with price 1 and 2 and would buy items with price 4 and 3.

Sample Input:
10 8
99 56 50 93 47 36 65 25 87 16

Sample Output:
533, I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
	public static void main (String[] args)throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str[]= br.readLine().trim().split(" ");
        int n=Integer.parseInt(str[0]);
        int k=Integer.parseInt(str[1]);
		str= br.readLine().trim().split(" ");
        int arr[]=new int[n];
		for(int i=0;i<n;i++)
			arr[i]=Integer.parseInt(str[i]);
        Arrays.sort(arr);
        long sum=0;
        for(int i=2;i<k+2;i++)
			sum+=arr[i];
        System.out.print(sum);
	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?