Hello and welcome to the next live coding challenge!
Write a decoder of roman numerals, which receives roman numeral as a string and returns an integer number.
Roman symbols cheatsheet:
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1,000
You can repeat a symbol max 3 times:
II 2
III 3
CCC 300
If you are to repeat some symbol 4th time, use it as a negative value preceding a higher symbol:
IV 4
XC 90
Except for negative values, roman numbers start at the highest symbol and end at the lowest:
MCXIV 1114
MMCMXCIII 2993
You can solve this programming contest in Java, JavaScript, Python, C++ and many more languages. If you want, you can also take part in other Challenges. Below you can find some of them:
Have fun and good luck! :)
Did you like this challenge and would like to try your hand at some interesting big programming competitions? Check what’s all over the news in tech world in April 2019 in our article with upcoming IT Conferences, Hackathons and Online Challenges.