Each test case is described by one line having the format "note tonality", where "note" is one of the 17 names for the scale notes given above, and "tonality" is either "major" or "minor" (quotes for

#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);

}

}

posted @ 2018-04-10 17:03  崔杯杯  阅读(143)  评论(0)    收藏  举报