Ad
  • Default User Avatar

    A logic that works for Ruby isn't working for Haskell. There should be consistency across languages. Only 1 default test isn't helping either. We're left with having to attempt trial and error method to fix issues.

    I don't know why I am encountering negative indices in Haskell. Shouldn't '>' be explicit. Even if I assume it when it's actually absent, I am not getting the results the tests expect.

  • Default User Avatar

    Issue with the Crystal variant. Getting the below error. Tried removing all my code and still getting it. Seems like something wrong with the tests.

    Error in line 1: while requiring "././spec.cr"

    in spec.cr:3: while requiring "./fixture"

    require "./fixture"
    ^

    in fixture.cr:27: instantiating 'dotest(UInt64, UInt64, UInt64)'

    dotest(20_u64, 3_u64, 5985_u64)
    ^~~~~~
    

    in fixture.cr:3: instantiating 'diagonal(UInt64, UInt64)'

    actual = diagonal(n, p)
             ^~~~~~~~
    

    in solution.cr:1: type must be UInt64, not Nil

    def diagonal(n : UInt64, p : UInt64) : UInt64

  • Default User Avatar

    Expected results are inconsistent between Haskell and Ruby, Crystal. The same input expects different results. For example an input of 696 expects 38 in Haskell but 23 in Ruby.

  • Default User Avatar

    Solution works fine in Ruby and Crystal but times out in Haskell?

  • Default User Avatar

    Okay, but how do I see the response for the earlier one? It's hidden.

    Are the numbers transitional? That is if there's a "1010" then a 1 and the following 0, do they mean that the button was pressed and then released? So if there are 2 1s in succession like "110", then does that mean that the button is being held down?

  • Default User Avatar

    There are examples but without explanations. So it's difficult to make sense out of it with the explanation above it. I see another user has reported the same but I can't see the response for thta because it's hidden as it's marked as spoiler.

  • Default User Avatar

    The tests seem to compare against either en-us or just en. They should stick to one. See below:

    expected: {:DESCRIPTION=>"third planet from the Sun in the Solar System", :ID=>"Q2", :LABEL=>"Earth"}
    got: {:DESCRIPTION=>"third planet from the sun in the solar system", :ID=>"Q2", :LABEL=>"Earth"}

    This is for Q2. As you can see the case varies. This is because the comparison is against en here while for Q42 it was against en-us.

  • Default User Avatar

    Haskell version is broken. Sample tests work but the final ones don't. Below is the error.

    test/SpecialSetsSpec.hs:34:67: error:
    • Variable not in scope: bouncy :: [Int]
    • Perhaps you meant ‘boun’ (line 39)
    |
    34 | sol_87 n = map (map' [minn,maxx,length]) $ map (takeWhile (<=n)) [bouncy,inc,dec]
    | ^^^^^^

    test/SpecialSetsSpec.hs:34:74: error:
    • Variable not in scope: inc :: [Int]
    • Perhaps you meant ‘incr’ (line 40)
    |
    34 | sol_87 n = map (map' [minn,maxx,length]) $ map (takeWhile (<=n)) [bouncy,inc,dec]
    | ^^^

    test/SpecialSetsSpec.hs:34:78: error:
    • Variable not in scope: dec :: [Int]
    • Perhaps you meant ‘decr’ (line 41)
    |
    34 | sol_87 n = map (map' [minn,maxx,length]) $ map (takeWhile (<=n)) [bouncy,inc,dec]
    | ^^^

  • Default 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]

  • Default User Avatar

    Name of the global variable that holds the values of the notes in Ruby is not mentioned in the description. I had to use global_variables method to print all global variables and figure out which one was it.

  • Default User Avatar

    I am trying the Haskell version and don't know what to make out of this.

    Falsified (after 3 tests and 1 shrink):
    0
    [-1]

    No info on what the input, expected and actual results are. Please rectify.

  • Default User Avatar

    Issue with Haskell version. It seems to expect a different answer from Ruby and Crystal versions. Ruby and Crystal expect 19 to be correct for the below but Haskell expects 42 instead. This can't be right.

    Falsifiable (after 1 test):
    850
    Borked out at: 850
    Expected: 42, Got: 19

  • Default User Avatar

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

  • Default User Avatar

    The Haskell version is out of line with respect to what it expects, compared to other versions.

    Falsifiable (after 11 tests):
    (8,"tO?O ? ") expected 2 but got 1

    How can this be? I mean how could the '?' be considered as a word and counted? Also a valid word cannot have punctuations in the middle.

  • Default User Avatar

    This can't be right. This is the Crystal version.

    Testing for [107, 18, 211, 244]
    Expected: -187493781
    got: 4107473515

    Many random tests are expecting negative values. If I use Int32 it fails due to overflow. If I use Int64 it only gives a positive value. Negative values are not correct.

  • Loading more items...