Conversion Rule


  • 0
    B
    I - 1
    V - 5
    X - 10
    L - 50
    C - 100
    D - 500
    M - 1000
    
    Rules:
    If I comes before V or X, subtract 1 eg: IV = 4 and IX = 9
    If X comes before L or C, subtract 10 eg: XL = 40 and XC = 90
    If C comes before D or M, subtract 100 eg: CD = 400 and CM = 900

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.