I beilve the code is correct but still fails to pass the test cases

import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner scn = new Scanner(System.in);
int t = scn.nextInt();
while (t > 0) {
int a = scn.nextInt();
System.out.println(nobsitr(a));
t–;
}

}
public static int nobsitr(int n) {
	int zero[] = new int[n];
	int one[] = new int[n];
	zero[0] = 1;
	one[0] = 1;
	for (int i = 1; i < n; i++) {
		zero[i] = zero[i - 1] + one[i - 1];
		one[i] = zero[i - 1];
	}
	return one[n - 1] + zero[n - 1];
}

}

@guptadev354,

https://ide.codingblocks.com/s/228961 corrected code.

Use long for one and zero arrays instead of int.