For this Question: Given an array (Arr) of N integers. You have to select a subsequence from this array such that its score is best possible. Score of a sequence is equal to 0 if the sum of the elements of the sequence is divisible by 10 otherwise the score is the sum of the elements of the sequence.
For example: the score of sequence 11, 2, 2, 1 is 16, and the score of sequence 1, 9 is 0.
You have to print the maximum possible score.The first line of input contains N. 
The second line of input contains N space-separated integers representing the array (Arr).

<b>Constraints :</b> 
1 &le; N &le;100000
1&le; Arr[i] &le; 100000Print the maximum possible score.  Sample Input 1
3
5 10 15

Sample output 1
25

<b>Explanation:</b>
 we select 10, and 15 as our sequence., 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));
		int n = Integer.parseInt(br.readLine());
		String[] str = br.readLine().split("\\s");
		int[] arr = new int[n];
        long sum=0;
		for(int i=0;i<n;i++){
			arr[i]=Integer.parseInt(str[i]);
            sum += arr[i];
		}
        Arrays.sort(arr);
        if(sum%10 !=0){
            System.out.println(sum);
        }
        else{
            int i=0;
            long value=sum;

            while(i<n){
                long curr = sum-arr[i];
                if(curr%10 != 0){
                    value=arr[i];

                    break;
                }
                i++;
            }
            System.out.println(sum-value);
        }


	}

}, In this Programming Language: Java, Now tell me if this Code is compilable or not?