View Code of Problem 3857

#include<iostream>

using namespace std;

//就这?

int main() {
	int t, n, temp;
	cin >> t;
	while (t--)
	{
		int num = 0;
		cin >> n;
		while (n--)
		{
			cin >> temp;
			if (temp == 2)
				num++;
		}
		cout << num << endl;
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 3857