Ad
  • Custom User Avatar

    A programmer would solve this in 1mn googling if he doesn't already know the maths solution. There's zero practice here. 1mn googling, 7kyu level coding.

    Besides, I'm not planning to become a programmer, I just want to practice the languages I'll use later and learn things about them in process. Does your comment mean that I shouldn't be on the site because it's only targetted at people who want to become programmers?

  • Custom User Avatar

    Not a programming problem but a math problem.

    While not uninteresting it itself, most people go to codewars to practice programming, not number theory. The problem isn't bad, it's just not suited for here.

    I have not tried to solve it with loops and stuff, but given how the problem was phrased I suspect that there was a check for efficiency, which can only be passed by solving / googling the math problem but represent zero coding difficulty.

    Edit: I'm not a hater, I solved it quite fast. I'm just objective.

  • Custom User Avatar

    I'm not sure about 6kyu for an O(f(n)) check is appropriate.

    The vectorized solutions in R aren't fast enough, or take up too much memory. This may be suitable for slightly higher difficulty, but 6kyu should still be baby steps imo.

  • Default User Avatar

    Instructions incorrect. We are not expected to output a stream of primes but a stream of primes IN ORDER, without skips.

    So for example we can't use some formulas to generate numbers that have high chance of being primes to reduce the number of checks on each number, since they would typically miss some primes in the sequence.

  • Default User Avatar

    As long as there exist one valid combination, then the grid is valid.