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.
Rust translation added
thank you man
Don't print, but return the result.
This comment is hidden because it contains spoiler information about the solution
I was specifically getting clarification on requirements. Requirements get updated as they become more clear. Please don't condescend in environments like this as it is extremely unhelpful.
well isn't part of the job of an programmer getting the information (in this case from the unit tests) to be able to implement what he/she should implement?
In the real world you won't get precise explaination what to do.
There is a sample test for that, isn't it?
Honestly, the description doesn't account for a scenario where the carry occurs within the number and not at the far right.
The description should definitely say:
"Only when there is a carry digit is the result different from real addition.""
The meme does not provide an example for all cases.
🥳
well i thought the meme should make it pretty clear should I add the explanation again? I think that this kata does not need it but yeah....
Btw sillyAdd(2,11) is really just 11+2 only when there is a carry digit the result is diffrent from a real addition.
In this "silly addition" method, you are still required to add corresponding digits for ones, tens, hundreds, etc. You align numbers to the right, not to the left.
According to the limited rules, shouldn't add(2, 11) => 31 not the expected 13?