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
Note: it changes the description a bit (specifically for Rust).
Now, the function prototype in the solution setup is incorrect.
Rust translation
It's a docstring. You can run
help(mirror_fold)to see this text.Rust translation
After some more fiddling, I've got that exactly floating point formula
produces the expected result. Changing the order, like first multiplying and then dividing, gives a totally different outcome.
And no, this is not a spoiler, this is an absolutely needed information to complete this kata - you should not just round up, but do calculations in double-precision floating point in this specific order. With the current tests, it should be in the description (or tests should be changed).
Can anyone explain HOW THE HELL should numbers be rounded? I got 5 medium tests failing, everything else (125 tests) fine. I printed data and got this:
The difference is in day 6237. The corresponding log:
In expected result, day 6237 should be 834169.
Can someone open my eyes and show how 380232 + 3234 * 3088 / 22 (which is 834168) is 834169 after rounding up? What kind of black magic is expected to be used?
Rust translation
C++ test fails:
Really?
Fixed EE
Changed the random speed to positive, optimized solution to nonsense, removed all unneeded high-level abstractions, and run rustfmt over all the code.
Good enough now?
fixed RPMs
The comment is obvously AI-generated.
I usually use different approaches in solution and reference to avoid mistakes; and I don't think the solution should be perfect, it should just work.
Positive RPMs in random tests - yes, I will fix it. I just copied the formula from the original code.
Rust translation
I mean a new kata with an alike task but harder test cases. Like 3 connected gears will never rotate.
Loading more items...