Count number of binary strings whats the error

Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while(t–!=0) {
int n = sc.nextInt();
int[] z = new int[n];
int[] o = new int[n];
o[0]=z[0]=1;
for(int i = 1;i<n;i++) {
z[i]=z[i-1]+o[i-1];
o[i]=z[i-1];
}
System.out.println(z[n-1]+o[n-1]);
}

take long instead of int. that ll resolve your test case.
please mark this as resolved