Ad
  • Custom User Avatar

    (I've stepped away from codewars so, I apologize it took this long before I noticed your message.)

    I felt I was clear both in the title and the description that what is sought is "special-parasitic numbers ending in N". I gave examples in the description and I note that the answers for all of the base-10 portion are under the "strict definition" section of the wikipedia link that I provided in the original kata description.

    So, while 142857 * 5 = 714285, 142857 does not end in 5 like the title and description request. The smallest that ends in 5 that is parasitic is 102040816326530612244897959183673469387755.

    I suspect what was confusing was that my meaning of "smallest," as defined in the description, differed from a similarly named section of the wikipedia link. In the 104 hex * 4 = 410, we could have repeated 104 any number of times and the property still holds. 104104104104104 hex * 4 = 410410410410410 hex -- the number the kata wants is 104, not 104104, 104104104, etc.

    IMHO, the fun challenge here is that the "ending in N" portion is what pushes some of the solutions into large numbers which cause problems for brute force approaches.

    (Note that the solution for all base-10 answers also appear in that strict-definition section.)

    I don't have a problem with the wording, but I'm open to suggestions that would improve the kata.