Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I thought this was really cool, down to two lines, but it doesn't work for cases where single numerals need to be treated as such. For example, XIX returns 21 with this solution instead of 19 like it's supposed to.
Wrong solution, should not compare the element with the accumulator, but the previous element
I too submitted a solution that didn't work for irregular subtractive expressions (such as "MCDXLIII").
Thanks for finding this issue! I used #reduce incorrectly
It's a broken solution!
MCDXLIII
is1443
but yoursolution("MCDXLIII")
is1663
because while reducing,
(1000+100)>500
while you thought that100<500