Please say which language you're using (there are many), with clear examples of logs or we cannot do anything. It's very probable you're doing something wrong and if you don't provide more elements this issue could be closed. Please read carefully this: https://docs.codewars.com/training/troubleshooting/
that's not how roman numbers work. in the case of IV, I (1) is subtracted to V (5) to give 4
you should search the internet for an article that explains how roman numerals work
Did you use 'return' in the code?
This comment is hidden because it contains spoiler information about the solution
No precision after 10 days. OP apparently uses C++, tests are fine in this language.
Please say which language you're using (there are many), with clear examples of logs or we cannot do anything. It's very probable you're doing something wrong and if you don't provide more elements this issue could be closed. Please read carefully this: https://docs.codewars.com/training/troubleshooting/
No number available in C/C++ can handle the values we are given here. That's the point of the kata: you must do it yourself.
Because
stoi
convert a string to anint
, and anint
cannot hold values so large.that's not how roman numbers work. in the case of
IV
,I
(1) is subtracted toV
(5) to give 4you should search the internet for an article that explains how roman numerals work