Time Limit: 1 sec
Given a string that correctly represents a Roman Numeral, print out the equivalent integer value of that Roman Numeral.
Roman Numeral = VIII
Equivalent Integer Value = 8
Roman Numeral = XIV
Equivalent Integer Value = 14
The input start with a positive integer number T (0<T<1001) which denoted the number of test cases. Each test case contain a string which represent the Roman Numeral and the length of the string not more than 20.
[Note: You may assume that the input string always a valid Roman Numeral.]
For each test case, print “Case X: S”, here X is the case number start from 1 to T and S is the equivalent integer value of that Roman Numeral.
Case 1: 8
Case 2: 1904
Problem Setter: Shahin ShamS