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.
The absolute KOTY = Kata Of The Year !!
Tkx...
Note if I may - in c++ - (I counted and outputed the values for testing)
fixed_tests : 20
random_tests
That could be in the description... (especially the fact that some 64 bits semiprimes will be tested IS actually important for the factorization algorithm...)
75 such tests
(C++)
Is it possible to get the number of tests of each category ?? Timing out @
semiprimes_64_bits
tests.Note: I already think that it's an absolutely excellent kata, BTW.
Still not solved but ... keep trying :-)
Approved
LGTM! Approved. One minor quirk is that operations like
(disb(gen)%(extra/2))+1
return a lower bound that is one-less than the JS version (ex:1
here instead of2
). It infinitesimally increases the likelihood of integer divisions, but that seems harmless to me (since thefinite division
section in JS also generates integer divisions every now and then). If another reviewer finds this a deal breaker, it can be forkedOK thanks, saw that you authored a lot of katas...
Moves the ref solution to the private section (learnt a thing there), also implemented the other ideas.
Note: I'm not confortable (at all) with range v3 and fmt/... with C++17 clang (therefore pretty comfortable with c++20/23 stuff ) but with clang there is a hell of a lot of shi.. to include...
You #4 is indeed nice !
Very faithful translation, but I would like to point out one issue and offer 3 suggestions:
referenceSolution
being a free public function means it is visible to the solver, who can invoke your function to pass the tests (after a simple forward declaration). Consider moving it into theprivate
section of theDescribe
structtest
function to this so the solvers receive error feedback:<cmath>
,<utility>
)stringstream
andsubstr
-ing out the zeroes can be replaced with a clearer one-liner The library handles the zeroes for you, and returns a result identical to what you've hand-rolledEverything else LGTM
(
#include <fmt/core.h>
assumed for #2 and #4):-)
Haha! You know it is possible, but your cached bitset works better. Bravo!
C++ translation waiting for comments or ... approval :-)
It did when I posted it :)
Can't figure out why the description says
and you must verify whether any pairs of primes satisfy the condition.
?IMHO this should be removed.
Somewhere in the description we may find the concept of unordered pair or pair set , as it is not clear wether you expect ordered or unordered pairs.
See https://en.wikipedia.org/wiki/Ordered_pair or https://en.wikipedia.org/wiki/Unordered_pair
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Loading more items...