Ad
  • Custom User Avatar

    Just in case someone else runs into this confusion: minimizing i takes precedence over minimizing j. This seemed consistent to me.

  • Custom User Avatar

    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.

  • Custom User Avatar

    Great, thanks a lot!

  • Custom User Avatar

    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.

  • Custom User Avatar

    Hi suic,

    Thanks for the fixes, I am happy that my solution works now :) I also have assessed the kata.

  • Custom User Avatar

    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 :)

  • Custom User Avatar

    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.

  • Custom User Avatar

    Those candidates would naturally fall out in the first round.

  • Custom User Avatar

    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.

  • Custom User Avatar

    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!

  • Custom User Avatar

    Interesting kata! There are the following issues:

    • the link to the other kata leads to nowhere.
    • it should be clarified that here divisors include the number itself; that is, the traditional perfect numbers are defined by k = 2. An example larger than 1 would help.
    • I would suggest to test for higher numbers. Now even the most unefficient algorithms easily pass.
  • Custom User Avatar

    Great, thanks!

  • Custom User Avatar

    I would suggest more extensive tests, also with random cases.

  • Custom User Avatar

    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.

  • Custom User Avatar

    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...