Hulk problem in the bit masking section

This is running fine on my terminal but not on hackerblocks . Plus it is always giving me error when i use scanner which runs perfectly on my terminal and any other platform . Please look into this .

import java.util.;
public class Main {
public static void main(String args[]) throws IOException{
// Your Code Here
BufferedReader br = new BufferedReader(new InputStreamReader(;
int tes = Integer.parseInt(br.readLine());
StringTokenizer st = new StringTokenizer(br.readLine());
while(tes > 0){
int n = Integer.parseInt(st.nextToken());
int ans = 0;
ans += n&1;
n = n>>1;