您的位置:首页 > 产品设计 > UI/UE

UVALive 7035 Built with Qinghuai and Ari Factor(水题)

2016-06-01 22:36 483 查看
思路:判断所有数能不能整除3,水题

#include<iostream>
#include<cstdio>
using namespace std;

int main()
{
int T,cas=1;
scanf("%d",&T);
while(T--)
{
int n;
scanf("%d",&n);
int flag = 1;
while(n--)
{
int x;
scanf("%d",&x);
if(x%3!=0)
flag=0;
}
if(flag)
printf("Case #%d: Yes\n",cas++);
else
printf("Case #%d: No\n",cas++);
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: