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.
Thanks for the explination, i figured that would be the case but did not like that it is invisibly included
it's a Codewars-specific behavior that won't work in general. The Codewars' C++ code runner adds some
#includedirectives before compiling the code, and<string>happens to be indirectly included.so why isnt #include necessary if your function expects a string output
🥷🏿's js trying his best to make the shortest line of code possible atp 😭🙏
Mr.Obvious :D
That's true, but there is no better way to do it, short of resorting to a higher-precision floating-point type.
You forgot for double inprecision, basicly floating-point arithmetic, not a good idea.
Something ain't right when 2 comes before n haha.
Nice practice.
Exactly as Jotha said, that was my reasoning. Return does the same as break here.
This comment is hidden because it contains spoiler information about the solution
The ol' reliable baby!
first you get dry content, which is constant(w0 * (100 - p0)), then we convert back to full weight by using reversal operation with new percentage
Can someone explain please? I'd really appreciate it.
nice!
Loading more items...