已AC代码:
#include<cstdio>
#include<cstring>
int main()
{
char s1[10], s2[10];
int temp, cont=1;
while(scanf("%s %s", s1, s2) != EOF)
{
temp = 0;
if(!strcmp(s1,"Ab"))
{
printf("Case %d: G# %s\n", cont,s2);
temp++;
cont++;
}
if(!strcmp(s1,"G#"))
{
printf("Case %d: Ab %s\n", cont,s2);
temp++;
cont++;
}
if(!strcmp(s1,"A#"))
{
printf("Case %d: Bb %s\n", cont,s2);
temp++;
cont++;
}
if(!strcmp(s1,"Bb"))
{
printf("Case %d: A# %s\n", cont,s2);
temp++;
cont++;
}
if(!strcmp(s1,"C#"))
{
printf("Case %d: Db %s\n", cont,s2);
temp++;
cont++;
}
if(!strcmp(s1,"Db"))
{
printf("Case %d: C# %s\n", cont,s2);
temp++;
cont++;
}
if(!strcmp(s1,"D#"))
{
printf("Case %d: Eb %s\n", cont,s2);
temp++;
cont++;
}
if(!strcmp(s1,"Eb"))
{
printf("Case %d: D# %s\n", cont,s2);
temp++;
cont++;
}
if(!strcmp(s1,"F#"))
{
printf("Case %d: Gb %s\n", cont,s2);
temp++;
cont++;
}
if(!strcmp(s1,"Gb"))
{
printf("Case %d: F# %s\n", cont,s2);
temp++;
cont++;
}
if(!temp)
{
printf("Case %d: UNIQUE\n", cont);
cont++;
}
}
return 0;
}