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
I know I may sound arrogant or boastful saying this, but I dont think this should be 3kyu. Its a cool idea, but in my opinion would be more at home at 5kyu.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
this is not surprising and that's exactly the problem with undefined behavior in C/C++ ... many things can happen depending on the platform, the way the code is run, the compiler, etc. the worst case scenario is when nothing special happens, until that one day when a cryptic bug pops up from nowhere. there are some tools that can help, such as static analyzers. when i ran your code in this one, it correctly detected UB when run with an empty string (warning, this analyzer is free and online but it's a bit slow and the UB diagnostics can be a bit cryptic if you're not well versed on low-level details)
In Python everything seems to be +1-3 kyu easier, while half as fast.
This comment is hidden because it contains spoiler information about the solution
please don't open issues to ask for help, ask a question instead, unless you can prove that the problem comes from the test suite and not your code. there is some info about this error message in the Codewars docs
try your code with an empty string
This comment is hidden because it contains spoiler information about the solution
the real Clever is removing the const keyword from the arguments
I assumed the solution page is only visible if you solved the kata?
Please mark your post as having spoiler content next time, your post was visible in the homepage.
This comment is hidden because it contains spoiler information about the solution
Hmm, assumed there would be another property besides gcd.
Would be cool if they put execution times next to each solution on this website.
Loading more items...