#include<cstdlib>
#include<stdio.h>
using namespace std;
bool sushu[40000]={0};
int is_sushu(int a)
{
if(sushu[a]==0)
return 1;
else
return 0;
}
int main()
{
int rank[40000]={0};
bool flag[40000]={0};
int N=0,K=0,ID=0;
for(int i=2; i<=200; i++)
for(int j=2*i; j<40000; j+=i)
sushu[j] = 1;
scanf("%d",&N);
int i=0;
while(i<N)
{
scanf("%d",&ID);
rank[ID] = i+1;
i++;
}
scanf("%d",&K);
int j=0;
while(j<K)
{
scanf("%d",&ID);
if(flag[ID]==1)
{
printf("%04d: Checked\n",ID);
}
else
{
if(rank[ID]==0)
{
printf("%04d: Are you kidding?\n",ID);
}
else if(rank[ID]==1)
{
printf("%04d: Mystery Award\n",ID);
flag[ID] = 1;
}
else if(is_sushu(rank[ID]))
{
printf("%04d: Minion\n",ID);
flag[ID] = 1;
}
else
{
printf("%04d: Chocolate\n",ID);
flag[ID] = 1;
}
}
j++;
}
return 0;
}
1059. C语言竞赛(20)
最新推荐文章于 2022-12-07 08:30:00 发布