Untitled
unknown
plain_text
2 years ago
649 B
11
Indexable
#include <bits/stdc++.h>
using namespace std;
main()
{
int test;
int n, k;
int arr[100000];
cin >> test;
for (int i = 1; i <= test; i++)
{
int cnt = 0;
cin >> n >> k;
for (int j = 0; j < n; j++)
{
cin >> arr[j];
}
for (int j = 0; j < n; j++)
{
if (arr[j]%3 == 0)
{
cnt++;
}
}
if(cnt>1 && cnt<n)
{
cout<<"Case "<<test<<": "<<cnt<<endl;
}
else
{
cout<<"Case "<<test<<": "<<"0"<<endl;
}
}
}Editor is loading...