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.
I think it's not a bug rather than lack of proper documentation. (updated)
But thanks for asking! :)
The original rules of calculating quipu is what I mentioned above. (I will update the description instead of the tests)
Do you mind to change it according to that?
@bejczib,
Do you need me to change my JS translation? (it contains random testcases)
Or, let it be as an independent version? (different rules)
@peterwang1996,
兄弟,这不能怪我啊,原作者这哥们没有提供随机测试,只有几个固定测试,所以关于连续的~的规则是我猜测的。
如果你是在尝试JS版本,请按照我的规则做吧,如果是Ruby, 请随意;-)
yes, @myjinxin2015, because of the rules mentioned above.
It has no affect to your solution, because the expected quipu soution is the same. It's just matter of interpretation in the middle of the algorithm.
@bejczib,
Do you mean
@~~~~@ => 1001
? Please tell me what's the numbers in this testcase:It is an interesting one! I have to say that myjinxin2015's answer ins't right..
When I found out the kata I didin't thought about corner cases like this.. :)
So the correct solution would be like this:
~ -> 0 or space
between two 0-s you have to put a space but between a 0 and 1 for example you haven't.
I will add more test to validate this solution. :)
@~~~~@@ === 10002