You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#include <cstdio>
|
|
using namespace std;
|
|
int main()
|
|
{
|
|
int T,n,x,t=0;
|
|
scanf("%d",&T);
|
|
while(T--)
|
|
{
|
|
scanf("%d",&n);
|
|
bool flag=true;
|
|
for(int i=0; i<n; i++)
|
|
{
|
|
scanf("%d",&x);
|
|
if(x%3!=0)
|
|
flag=false;
|
|
}
|
|
printf("Case #%d: %s\n",++t,flag?"Yes":"No");
|
|
}
|
|
return 0;
|
|
}
|