#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
int main (void)
{
int test_case = 0;
char note[1000];
while ( gets( note ) != NULL )
{
test_case ++;
if ( note[0] == 'A' && note[1] == ' ' )
printf( "Case %d: UNIQUE\n", test_case );
else if ( note[0] == 'A' && note[1] == '#' )
{
note[0] = 'B';
note[1] = 'b';
printf( "Case %d: %s\n", test_case, note );
}
else if ( note[0] == 'B' && note[1] == 'b' )
{
note[0] = 'A';
note[1] = '#';
printf( "Case %d: %s\n", test_case, note );
}
else if ( note[0] == 'B' && note[1] == ' ' )
printf( "Case %d: UNIQUE\n", test_case );
else if ( note[0] == 'C' && note[1] == ' ' )
printf( "Case %d: UNIQUE\n", test_case );
else if ( note[0] == 'C' && note[1] == '#' )
{
note[0] = 'D';
note[1] = 'b';
printf( "Case %d: %s\n", test_case, note );
}
else if ( note[0] == 'D' && note[1] == 'b' )
{
note[0] = 'C';
note[1] = '#';
printf( "Case %d: %s\n", test_case, note );
}
else if ( note[0] == 'D' && note[1] == ' ' )
printf( "Case %d: UNIQUE\n", test_case );
else if ( note[0] == 'D' && note[1] == '#' )
{
note[0] = 'E';
note[1] = 'b';
printf( "Case %d: %s\n", test_case, note );
}
else if ( note[0] == 'E' && note[1] == 'b' )
{
note[0] = 'D';
note[1] = '#';
printf( "Case %d: %s\n", test_case, note );
}
else if ( note[0] == 'E' && note[1] == ' ' )
printf( "Case %d: UNIQUE\n", test_case );
else if ( note[0] == 'F' && note[1] == ' ' )
printf( "Case %d: UNIQUE\n", test_case );
else if ( note[0] == 'F' && note[1] == '#' )
{
note[0] = 'G';
note[1] = 'b';
printf( "Case %d: %s\n", test_case, note );
}
else if ( note[0] == 'G' && note[1] == 'b' )
{
note[0] = 'F';
note[1] = '#';
printf( "Case %d: %s\n", test_case, note );
}
else if ( note[0] == 'G' && note[1] == ' ' )
printf( "Case %d: UNIQUE\n", test_case );
else if ( note[0] == 'G' && note[1] == '#' )
{
note[0] = 'A';
note[1] = 'b';
printf( "Case %d: %s\n", test_case, note );
}
else if ( note[0] == 'A' && note[1] == 'b' )
{
note[0] = 'G';
note[1] = '#';
printf( "Case %d: %s\n", test_case, note );
}
else
assert(false);
}
return EXIT_SUCCESS;
}
NYOJ A Famous Music Composer
最新推荐文章于 2020-06-04 11:06:35 发布