#include<stdio.h>
int isPrime(int x)
{
int i;
for(i=2; i<(x/2)+1; i++)
{
if(x%i == 0)
return 0;
}
return 1;
}
int main()
{
int N;
int k;
int search, count[10000]={0};
int rank = -1;
int ID[10000];
int i, j;
scanf("%d", &N);
for(i=0; i<N; i++)
{
scanf("%d", &ID[i]);
}
scanf("%d", &k);
for(i=0; i<k; i++)
{
scanf("%d", &search);
rank = -1;
for(j=0; j<N; j++)
{
if(search == ID[j])
{
rank = j;
count[rank]++;
}
}
if(rank == -1)
{
printf("%04d: Are you kidding?\n", search);
}
else if(count[rank] > 1)
{
printf("%04d: Checked\n", search);
}
else
{
printf("%04d", search);
if(rank+1 == 1)
printf(": Mystery Award\n");
else if(isPrime(rank+1))
printf(": Minion\n");
else
printf(": Chocolate\n");
}
}
}
网友评论