Ad
  • Custom User Avatar

    bad exercise.

  • Custom User Avatar

    no libraries are blocked in this kata, there is only the code character count limit

  • Custom User Avatar

    That's weird, in some other kata seems to work. At least, it doesn't throw an error when importing it. Maybe it's related to the characters limit?

  • Custom User Avatar

    @abrunk read which libraries you can use here: https://docs.codewars.com/languages/python

  • Custom User Avatar

    The kata does not block Scipy, it's simply not installed on Codewars.

  • Custom User Avatar

    that's what I said o_O

  • Custom User Avatar

    As I understand it, "come up with" means research. Unless you are a mathematician by trade :P

  • Custom User Avatar

    those libraries are not required, you need to come up with research a specific "prime counting" algorithm

  • Default User Avatar

    I guess you are supposed to implement a quick algorithm to count primes.
    You have numpy and gmpy2 to help you dealing with a fast implementation.

  • Custom User Avatar

    This seems impossible i used 6n+1, 6n-1 theorem which means that i'm reducing the loops by 66.67%.In my IDE it runs in 7.11 secs for 10000000.However here, it shows tle.

  • Default User Avatar

    I am afraid you mix this case with the previous one.
    The test is "testing(163, 1, ts, 50)".

  • Default User Avatar

    Hi @abrunk, and welcome to Codewars!

    I don't use R personally, and because it's not one of the most popular languages on the site sometimes it can be hard to get a quick reply to queries for that language.

    Looking at the kata data, it seems that there have been already 22 solutions submitted though, without any Issues having been raised in Discourse about R specifically. So unless there has been some major update to the R language (?) that would now make the kata unsolvable, it seems like there's a way to solve this.

    As a quick approach to troubleshooting: can you look through the provided Example Tests to see what the kata is expecting? Are they using some methods/modules that might be relevant?

    If you have access to Discord, my best advice would be to drop by the Codewars Discord - there is a #help-solve channel where you're more likely that a R user can give you a helpful reply.