1. 程式人生 > >Each test case is described by one line having the format "note tonality", where "note" is one of th

Each test case is described by one line having the format "note tonality", where "note" is one of th

#include <stdio.h>
#include <string.h>
int main() {
int i=0;
char s1[20],s2[20];


while(scanf("%s %s",s1,s2)!=EOF) {
i++;
if(strcmp(s1,"A#")==0) printf("Case %d: Bb %s\n",i,s2);
else if(strcmp(s1,"C#")==0) printf("Case %d: Db %s\n",i,s2);
else if(strcmp(s1,"D#")==0) printf("Case %d: Eb %s\n",i,s2);
else if(strcmp(s1,"F#")==0) printf("Case %d: Gb %s\n",i,s2);
else if(strcmp(s1,"G#")==0) printf("Case %d: Ab %s\n",i,s2);
else if(strcmp(s1,"Bb")==0) printf("Case %d: A# %s\n",i,s2);
else if(strcmp(s1,"Db")==0) printf("Case %d: C# %s\n",i,s2);
else if(strcmp(s1,"Eb")==0) printf("Case %d: D# %s\n",i,s2);
else if(strcmp(s1,"Gb")==0) printf("Case %d: F# %s\n",i,s2);
else if(strcmp(s1,"Ab")==0) printf("Case %d: G# %s\n",i,s2);
else printf("Case %d: UNIQUE\n",i);

}
 
}