Teachers and parrents

Our numbers 1, 2, 3, 4 ... are called Arabic, and numbers written with letters are called Roman numbers.

  1. Roman numerals are written using the letters:
    1. I =1
    2. V =5
    3. X =10
    4. L =50
    5. C =100
    6. D =500
    7. M =1 000
  2. Roman numerals consist of the letters from the highest to the lowest. At most 3 same Roman numerals (XXX = 30, III = 3) are combined.
  3. The smaller Roman numeral before the larger indicates the subtraction (IV = 4, 5 - 1 = 4, V - I = IV). Only one Roman numeral is subtracted in this way.
  4. Subtraction according to the above rule applies to Roman numerals I, X, C.
  5. The numeral I is used for subtraction only before V and X.

Instructions:

Convert the Roman number to "our" number.

Example

CCLII =

Solution

CCLII = 252

Solve exercises