Help! Java NZEC error

This code runs fine on my BlueJ compiler but gives Nzec error on the codechef complier…can someone check this please!?
Question link: CodeChef: Practical coding for everyone

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

class CodeChef
{
    public static void main (String[] args) throws java.lang.Exception, IOException
    {
        Scanner sc = new Scanner(System.in);
        int T = sc.nextInt();
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        while(T>0)
        {
            int N= sc.nextInt();
            String s= br.readLine();
            int A[]= new int[N];
            StringTokenizer st = new StringTokenizer(s);
            for(int i=0; i<N; i++)
                      A[i]= Integer.parseInt(st.nextToken());
                    int c= 0;  
                      for (int i=0; i<N; i++)
                      {
                          for (int j=0; j<N; j++)
                          {
                              if(i!=j)
                              {
                                  int f= A[i]*A[j]+A[i]-A[j];
                                  if(f>c)
                                  c=f;
                                }
                            }
                        }
                        System.out.println(c);
                        T--;
                    }
                }
            }

Please either format your code or (better!) link to your submission - the forum software has mangled it and it won’t compile! :slight_smile:

Also - what Problem are you trying to solve?

CodeChef: Practical coding for everyone this is the question

CodeChef: Practical coding for everyone the submission link

1 Like