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.
Just in case someone else runs into this confusion: minimizing i takes precedence over minimizing j. This seemed consistent to me.
This probably is a detail, but Julia indexes starting with 1, so to keep things consistent, it would be better to return 1-based index values for i and j, i.e. adding 1 to them for the test cases in Julia.
Great, thanks a lot!
In addition to the question regarding 2 and 5 (which I also found confusing), I suggest to add the range of numbers to be tested in the description. This is especially useful given the hard version made by @docgunthrop.
Hi suic,
Thanks for the fixes, I am happy that my solution works now :) I also have assessed the kata.
Hi suic,
I think it will be good, however you might want to use the function _hundreds(...) instead of hundreds(...) in your test code. My solution gave a cryptic error message always at the beginning of the random tests, turns out I also have the same function name :)
A small typo in the description:
Numbes is between 10 and 39
You could also give an explicit example for a number that ends with thousands (e.g. 345000). I would also explictly mention that there is no "egyszáz" just like "egyezer".
Otherwise it is a great kata, thanks for putting the effort in it!
PS: Nincs mit :)
Being a native speaker I struggled with this kata more than what I should have :)
There is one small issue: one must not put "-" between the thousands and hundreds if the number is between 1000 and 2000:
1040 -> "ezernegyven"
The hyphen is only there for numbers > 2000:
2040 -> "kétezer-negyven".
This is not a big fix for the submitted codes as 1000 is a special case anyways.
Those candidates would naturally fall out in the first round.
Awesome kata that shows how the same problem can be tackled in many ways (mine being very far from the optimal ones).
However, I would suggest to add more, preferably random test cases. This kata deserves it.
Let me follow up on the issue raised by PaulCalvelage. Arguably, right now copy-pasting A110819 up to Nmax is sufficient to solve the kata. Maybe a requirement to list the prime factors in question would solve this problem, e.g. [1089, [3,11], 2178, [2,3,11], ...].
Otherwise very interesting and rewarding kata!
Interesting kata! There are the following issues:
Great, thanks!
I would suggest more extensive tests, also with random cases.
I think this part is fine, because 200 is only there to emphasize the upper boundary. The rest, 30..180 are 6 numbers that qualify.
Maybe it is only me, but from the description it looks like you are looking for numbers that only contain the first n primes as factors. Unfortunately, the provided example also points in this direction (since the first counterexample would be 2x3x5x7=210>200). Granted, the second test case gives it away, but a more clear description could have saved me a lot of headache :)
Loading more items...