My issue
I got answer correct,but it shows wrong answer.
please help me to solve this problem
My code
import java.util.Scanner;
public class Main{
public static void main(String[] args)
{
Scanner sc=new Scanner(System.in);
int t=sc.nextInt();
while(t-->0)
{
long n=sc.nextLong();
int N=(int)n;
int count=0;
long arr[]=new long[N];
for(int i=0;i<N;i++)
{
arr[i]=sc.nextInt();
}
for(int i=0;i<N;i++)
{
if(arr[i]%2!=0)
{
count++;
}
}
System.out.println(count);
}
}
}
Learning course: Arrays, Strings & Sorting
Problem Link: Chef and Dolls Practice Problem in - CodeChef