6 kyu

Not prime numbers

520 of 1,551riyakayal
Description
Loading description...
Fundamentals
Performance
Algorithms
  • Please sign in or sign up to leave a comment.
  • www.BCFCODE.ir Avatar

    I really enjoyed this one! Prime numbers strike again — they never get old. Always fun to revisit them with a new twist!

  • Just4FunCoder Avatar

    Haskell:

    Description says a and b will both be <= 20000 but the tests expect values beyond that.

  • artem-totality Avatar

    One more Prime numbers kata!

  • ahmet_popaj Avatar

    Another nice kata of the series on primes and performance.

  • Amr Elnaggar  Avatar

    so suitable by c++

  • Iron Fingers Avatar

    Ruby version is faulty. Description says a and b will both be <= 20000 but the tests expect values beyond that.

    [2222, 2223, 2225, 2227, 2232, 2233, 2235, 2252, 2253, 2255, 2257, 2272, 2275, 2277, 2322, 2323, 2325, 2327, 2332, 2335, 2337, 2352, 2353, 2355, 2372, 2373, 2375, 2522, 2523, 2525, 2527, 2532, 2533, 2535, 2537, 2552, 2553, 2555, 2572, 2573, 2575, 2577, 2722, 2723, 2725, 2727, 2732, 2733, 2735, 2737, 2752, 2755, 2757, 2772, 2773, 2775, 3222, 3223, 3225, 3227, 3232, 3233, 3235, 3237, 3252, 3255, 3272, 3273, 3275, 3277, 3322, 3325, 3327, 3332, 3333, 3335, 3337, 3352, 3353, 3355, 3357, 3372, 3375, 3377, 3522, 3523, 3525, 3532, 3535, 3537, 3552, 3553, 3555, 3572, 3573, 3575, 3577, 3722, 3723, 3725, 3732, 3735, 3737, 3752, 3753, 3755, 3757, 3772, 3773, 3775, 3777, 5222, 5223, 5225, 5232, 5235, 5252, 5253, 5255, 5257, 5272, 5275, 5277, 5322, 5325, 5327, 5332, 5335, 5337, 5352, 5353, 5355, 5357, 5372, 5373, 5375, 5377, 5522, 5523, 5525, 5532, 5533, 5535, 5537, 5552, 5553, 5555, 5572, 5575, 5577, 5722, 5723, 5725, 5727, 5732, 5733, 5735, 5752, 5753, 5755, 5757, 5772, 5773, 5775, 5777, 7222, 7223, 7225, 7227, 7232, 7233, 7235, 7252, 7255, 7257, 7272, 7273, 7275, 7277, 7322, 7323, 7325, 7327, 7332, 7335, 7337, 7352, 7353, 7355, 7357, 7372, 7373, 7375, 7377, 7522, 7525, 7527, 7532, 7533, 7535, 7552, 7553, 7555, 7557, 7572, 7575, 7722, 7725, 7732, 7733, 7735, 7737, 7752, 7755, 7772, 7773, 7775, 7777, 22222, 22223, 22225, 22227, 22232, 22233, 22235, 22237, 22252, 22253, 22255, 22257, 22272, 22275, 22322, 22323, 22325, 22327, 22332, 22333, 22335, 22337, 22352, 22353, 22355, 22357, 22372, 22373, 22375, 22377, 22522, 22523, 22525, 22527, 22532, 22533, 22535, 22537, 22552, 22553, 22555, 22557, 22572, 22575, 22577, 22722, 22723, 22725, 22732, 22733, 22735, 22737, 22752, 22753, 22755, 22757, 22772, 22773, 22775, 23222, 23223, 23225, 23232, 23233, 23235, 23237, 23252, 23253, 23255, 23257, 23272, 23273, 23275, 23277, 23322, 23323, 23325, 23332, 23335, 23337, 23352, 23353, 23355, 23372, 23373, 23375, 23377, 23522, 23523, 23525, 23527, 23532, 23533, 23535, 23552, 23553, 23555, 23572, 23573, 23575, 23577, 23722, 23723, 23725, 23727, 23732, 23733, 23735, 23737, 23752, 23755, 23757, 23772, 23775, 23777, 25222, 25223, 25225, 25227, 25232, 25233, 25235, 25252, 25255, 25257, 25272, 25273, 25275, 25277, 25322, 25323, 25325, 25327, 25332, 25333, 25335, 25337, 25352, 25353, 25355, 25372, 25375, 25377, 25522, 25525, 25527, 25532, 25533, 25535, 25552, 25553, 25555, 25557, 25572, 25573, 25575, 25722, 25723, 25725, 25727, 25732, 25735, 25737, 25752, 25753, 25755, 25757, 25772, 25773, 25775, 25777]

  • saudiGuy Avatar
  • laurelis24 Avatar

    Time: 7000+ms Pretty damn bad. xD

  • 66  Avatar
  • 66  Avatar

    Language: C++
    Test suit missing the required header std::vector.

  • AlcalinoDev Avatar

    Can somebody tell me whats the input size? Description says that b <= 20000, but my IDE shows that my code can handle that in under 200ms, however Im getting timed out

  • MikChan Avatar

    This comment has been hidden.

  • user1430804 Avatar

    Basic Tests Sample Tests (5 of 5 Assertions) Random Tests Small Random Tests (200 of 200 Assertions) Big Random Tests (855 of 855 Assertions) STDERR Execution Timed Out (12000 ms)

  • Isaac-hx Avatar

    have issue 2773 is prime number

  • farhanaditya Avatar

    Language: JavaScript

    Based on the test case: a is inclusive and b is exclusive, but the description doesn't say anything about it.

  • SunMaster Avatar

    c++ basic test won't compile unless you include

    using namespace std;
    

    Attempt compiles.

  • Gusihob Avatar

    This comment has been hidden.

  • user5906076 Avatar

    This comment has been hidden.

  • KenKamau Avatar

    Haskell translation

    Please review and approve.

  • Saasha Joshi Avatar

    This question needs to increase its time limit. I have got all the variations of my anwer correct in the sample tests, but during the final attempt my answer is rejected due to the time it takes to execute, despite being absolutely correct! Or either reduce the range of data provided!

  • Saasha Joshi Avatar

    This question needs to increase its time limit. I have got all the variations of my anwer correct in the sample tests, but during the final attempt my answer is rejected due to the time it takes to execute, despite being absolutely correct! Or either reduce the range of data provided!

  • user5608198 Avatar

    This was supposed to be a 6kyu kata but i was only rewarded two points , why?

  • clcraig Avatar

    @riyakayal, C/C++ and Java translations available.

  • KenKamau Avatar

    Haskell translation

    Please review and approve.

  • rokoburilo Avatar

    This comment has been hidden.

  • KenKamau Avatar

    Javascript translation

    Please review and approve.

  • KenKamau Avatar

    Haskell translation

    Please review and approve

  • Firefly2002 Avatar

    Ruby translation submitted :)

  • s7r Avatar

    STDERR: File "", line 10 test.describe("Basic Tests") ^ IndentationError: expected an indented block

    ?

  • anter69 Avatar

    The test range is not very well chosen, as there are no such numbers between 7777 and 22222...

  • yellowBunny Avatar

    This comment has been hidden.

  • anter69 Avatar

    I suggest to use a pregenerated list of numbers for the checker function, as that would allow more time for user's solution and/or allow to check higher numbers.

  • Blind4Basics Avatar

    I strongly recommand the addition of the performance tag. Your requirements are somewhat huge, here. ;)