NZEC in Smartphone problem

Scanner sc = new Scanner(System.in);
	int size = sc.nextInt();
	System.out.println(size+"");
	long arr[] = new long[size];
	for(int i=0;i<size;i++){
	    arr[i] = sc.nextLong();
	}
	Arrays.sort(arr);\

https://www.codechef.com/users/wickedknight
Smart phine dumb user
long sum = arr[arr.length-1];
for(int i=0;i<arr.length-1;i++){
if((arr[i](arr.length-i))>sum)
sum = arr[i]
(arr.length-i);
}
System.out.println(sum+“”);

Do you still have this query ? I see you got an AC already.

yeah, it somehow worked i submitted the code. Don’t know why though.