@@ -0,0 +1,795 @@
+import java.io.*;%0Aimport java.util.*;%0Aimport java.text.*;%0Aimport java.math.*;%0Aimport java.util.regex.*;%0A%0Apublic class Solution %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A        /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */%0A        Scanner sc=new Scanner(System.in);%0A        int N=sc.nextInt();%0A        int K=sc.nextInt();%0A        int%5B%5D prices=new int%5BN%5D;%0A        int sumWithoutKth=0;%0A        for(int i=0;i%3CN;i++)%7B%0A            prices%5Bi%5D=sc.nextInt();%0A            if(i!=K) sumWithoutKth+=prices%5Bi%5D;%0A        %7D%0A        int priceCharged=sc.nextInt();%0A        if(priceCharged==sumWithoutKth/2)%7B%0A            System.out.println(%22Bon Appetit%22);%0A        %7D%0A        else%7B%0A             System.out.println(prices%5BK%5D/2);%0A        %7D%0A    %7D%0A%7D

add BonAppetit.java