暴力唯美
#include<stdio.h>
#include<string.h>
int main(void)
{
char ch[20];
int n, red, yellow, B, L;
while (scanf("%d", &n) != EOF && n) {
scanf("%s", ch);
red = yellow = B = L = 0;
if (strlen(ch) < 8) {
if (strchr(ch, 'B')) {
printf("Yellow\n");
} else if (ch, 'L') {
printf("Red\n");
}
} else {
for (int i = 0; i < strlen(ch); i++) {
switch (ch[i]) {
case 'R': red++; break;
case 'Y': yellow++; break;
case 'B': B++; break;
case 'L': L++; break;
}
}
//printf("R:%d Y:%d B:%d L:%d\n", red, yellow, B, L);
if (red == 7 && B == 1) {
printf("Red\n");
} else if (yellow == 7 && L == 1) {
printf("Yellow\n");
} else if (red < 7 && L == 1) {
printf("Red\n");
} else if (yellow < 7 && B == 1) {
printf("Yellow\n");
} else if (red == 7 && L == 1) {
printf("Red\n");
} else if (yellow == 7 && B == 1) {
printf("Yellow\n");
} else if (red < 7 && B == 1) {
printf("Yellow\n");
} else if (yellow < 7 && L == 1) {
printf("Red\n");
}
}
}
return 0;
}