Use long instead of int
the code is returning set of new errors on replacing int to long.
T shall be int, array shall be long. In the 20th line, rewrite the following
int a = sc.nextInt();
arr[i] = a;
as
arr[i] = sc.nextLong();
thanx ! it worked.
