View Code of Problem 3857

# include<stdio.h>
int main(){
	int T,n;
	scanf("%d",&T);
	while(T){
		scanf("%d",&n);
		int A[n];
		int count=0;
		for(int i=0;i<n;i++){
			scanf("%d",&A[i]);
			if(A[i]==2){
				count++;
			}
		}
		printf("%d\n",count);
		T--;
	}
	return 0;
} 

Double click to view unformatted code.


Back to problem 3857