• rooroo@feddit.org
    link
    fedilink
    arrow-up
    2
    ·
    7 hours ago

    No, cause you do the replacement from large to small, I.e. you’d first check for 10 I to replace with X (none found); then replace 9 with IX (check), then check for 5, 4 and so on.

    • lugal@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      2
      ·
      7 hours ago

      The original doesn’t have an extra check for 9 and it works for Roman->Indioarabic because it’s:

      IX
      ->IVV
      ->IIIIV
      ->IIIIIIIII
      

      But the other way around, you need an extra step for 9. That’s where our misunderstanding comes from.