Ad
  • Custom User 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]

  • Custom User Avatar
  • Custom User Avatar

    You might mention you want ALL people to get served. In my initial attempt I sent some people home so that others could eat.

  • Custom User Avatar

    Solution Set-up is wrong.

  • Custom User 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

  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

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

  • Custom User 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.

  • Custom User Avatar

    Well these test cases look familiar ;-0

    Maybe you should write your own tests cases for this kata instead of copying mine (which was written for a totally different kata) :P

  • Custom User Avatar
    • no sample tests
    • description is missing what to do when dealing with negative numbers
    • the nearest square to 0 or a negative number is NOT 1, this is 0...
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution