public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n1 = sc.nextInt();
int n2 = sc.nextInt();
int count = 0;
int n=1;
int d = 3 * n + 2;
while (count<n1) {
d = 3 * n + 2;
n++;
if (d % 4 != 0) {
System.out.println(d);
count++;
}
}
}
My code is only running for 1st test case. please help in this.