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.
Ranks can't be changed.
I loved the kata but 4 kyu is a bit too much. I'd rank it 5 kyu max.
in c++ input parameter has type long, but 10e10 numbers can't fit into long, maybe change to long long?
This kata is SOO GOOD!
I've spent a whole day figuring out how to optimize the code, since it timed-out at random tests. It made me go through the rabbit hole of finding out how the summation of digits works and how to MAX the result and minimize the number of iterations.
Honestly, this mixture of frustration and EUREKA! is what I'm looking for.
This comment is hidden because it contains spoiler information about the solution
Riiiiight... I really had to think on this one. Coming from a Python community I 100% thought it meant "define a variable of type 'str', i.e. 'type string' in Python. All good now.
Thank you for your help :)
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Your explanation here would be a good start: "you need to count how many possible ways to get at least one
Letter with Head/Tail
(from the input string)". I see six of the phrase you emphasised throughout the questionLetter with Head/Tail
in the result. "Total Possible Amount" is not defined well.Ah, got it! I misread the second group and thought there are OO followed by 1 or more X (and vice versa with XX in the beginning).
Thank you for the translation
Oh, see the way you did it, its the same. My bad.
Is my setting for big random tests any different from yours?
My setting of the big random tests is: 50 tests, from 51 to 100, 1 test for each length. Not a big deal.
Otherwise the translation looks good for me.
I defined the
Letter with Head/Tail
, and you need to count how many possible ways to get at least oneLetter with Head/Tail
from the given string without overlap.I don't know how you get 6, from which example.
But not giving how it would be misinterpreted, I cannot debug it. If it is an issue of misleading description, please give me specific and raise another issue.
Loading more items...