1 /*
 2 描述
 3 Mr. B, Mr. G and Mr. M are now in Warsaw, Poland, for the 2012’s ACM-ICPC World Finals Contest.
 4  They’ve decided to take a 5 hours training every day before the contest. Also, 
 5  they plan to start training at 10:00 each day since the World Final Contest will do so.
 6   The scenery in Warsaw is so attractive that Mr. B would always like to take a walk outside for a while after breakfast.
 7    However, Mr. B have to go back before training starts, otherwise his teammates will be annoyed. Here is a problem: 
 8         Mr. B does not have a watch. In order to know the exact time, he has bought a new watch in Warsaw, 
 9         but all the numbers on that watch are represented in Roman Numerals. Mr. B cannot understand such kind of numbers. 
10         Can you translate for him?
11 输入
12 Each test case contains a single line indicating a Roman Numerals that to be translated. All the numbers can be found on clocks. 
13 That is, each number in the input represents an integer between 1 and 12. Roman Numerals are expressed by strings consisting of uppercase ‘I’,
14  ‘V’ and ‘X’. See the sample input for further information.
15 输出
16 For each test case, display a single line containing a decimal number corresponding to the given Roman Numerals.
17 样例输入
18 I
19 II
20 III
21 IV
22 V
23 VI
24 VII
25 VIII
26 IX
27 X
28 XI
29 XII
30 样例输出
31 Case 1: 1
32 Case 2: 2
33 Case 3: 3
34 Case 4: 4
35 Case 5: 5
36 Case 6: 6
37 Case 7: 7
38 Case 8: 8
39 Case 9: 9
40 Case 10: 10
41 Case 11: 11
42 Case 12: 12
43 */
44 #include<stdio.h>
45 #include<string.h>
46 int main()
47 {
48     char s[12][10]={"I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII"},c[10];
49     int i, j=1;
50     while(scanf("%s",c) != EOF)
51     {
52         for(i = 0; i<12; i++)
53             if(strcmp(c,s[i])==0)//将c与没行测试数据进行比较 
54             printf("Case %d: %d\n",j++,++i);
55     }
56     return 0;
57 }