Ad
  • Custom User Avatar

    The problem is that you seem to make a substitution by finding the first character. In your case it is M; CM = 900. You need to refine the algorithm so that the longest possible combination of several characters is found first.
    First find CM, change it to 900, then find M and change it to 1000. The result sum is 1900.