Ad
  • Custom User Avatar

    To add to the confusion, I didn't see the correlation between the pairs and how that lead to solving even when looking at the example solutions. So we are finding groups within larger numbers and those groups have divisor harmony as shown at the top. Now how does that lead to an answer for this and the samples? For solve(1,200) why are we choosing 6,30 when other divisors could work? I'm seeing a lot of math that makes sense but the wording and maybe layout is really confusing on how it all ties together and can lead to a logical problem+solution. Do 6,28, and 496 have any notable correlation outside of a matching harmony? Showing the individual factors for each suggests that there should be a pattern here. Reading these comments hasn't made the challenge any more clear so I'm very very much lost.

  • Default User Avatar

    Ok. I've updated.

    Many thanks.

  • Default User Avatar

    I believe "Pair" was the worst offender.

    Find all the groups in that range where each member of the group within the range.

    This still needs changing! Doesn't make sense. After removing extra use of "range" and adding "is", it becomes:

    Find all the groups where each member is within the range.

    The range requirement has however already been stated. This says nothing and can be removed. It is also not the groups that should be found (it is the smallest values of the groups) so it is non-information.

    Suggestion:

    Given a range(a, b), return the sum of the lowest member of each group.

    Redundancies are good for descriptions here at Codewars.

    Not when that makes relevant information sparsely scattered between other repeated information! The use of different terms and formats additionally makes it difficult to tell whether something is new information or something that's already been said. There's also something to be said for brevity and being able to fit an idea in ones head.

    I also think implied rules/constraints are Good Things when faithfully implementing the description results in the implications being included. The area of a rectangle is also the area of a square. The sum of empty is 0.
    I understand this may raise questions, but that might actually be a good thing. But I also understand that the traffic might not be desirable for you.

  • Default User Avatar

    I've removed the word pair. Using the words group & grouping now.

    This Kata defines group/grouping as having 2 or more members that have the same ratio. This is is not a notation issue. The definitions are given as follows:

    We shall say that (6,28,496) is a grouping with a ratio of 2.
    We shall say that (30,140) is a grouping with a ratio of 12/5.
    

    Removed nil requirement for Ruby.

    Redundancies are good for descriptions here at Codewars. The point has to be belabored, otherwise its never understood. I know this, because I've authored more than 100 Katas. Anyway, I hope the changes work now.

  • Default User Avatar

    The word "pair" is misleading. It is not what you mean and it isn't previously defined in the description either. Please use something like "grouping of size 2 or more" instead.

    I find this notation to be confusing: (6,28,496) because it suggests that this is a tuple which in turn suggests that it is fixed length, or rather lacks length and has three values. It's a group and a group isn't specifically three values, it's a list. Ergo [6, 28, 496]

    (6,28) and (30,140) are the only pairs in which every member of a pair is 0 <= n < 200. The sum of the lowest members of each pair is 6 + 30 = 36.

    Here you are introducing a second notation for a range (the other one being range(a, b)). Better if you use the same one everywhere.

    nil in Ruby is unneccessary, the sum of zero things is 0.

    Find all the pairs in that range where each member of the pairs within the range.

    "range" is mentioned twice but only has meaning once, and it doesn't make sense/English syntax error

    The task isn't fully described, it leans too much on examples.

    For solve(1,500), do not include all (6,28) & (6,496) & (28,496). Count the group once by including 6 only.

    That's redundant if you describe what a group is. Also, group is now a third term (grouping pair group) for the same thing.

    There are many formats used for list:

    (6,28,496)
    1, 2, 3, 5, 6, 10, 15 & 30
    1, 2, 4, 5, 7, 10, 14, 20, 28, 35, 70, 140
    [6, 12, 30, 40, 66, 78, 80, 84, 102]
    

    They're all the same thing. One format.

  • Default User Avatar

    Did you read this part of the description?

    with the same multiplicities

  • Default User Avatar

    Try it in a code editor and see if it works there

  • Default User Avatar

    One of the failing examples should explain that
    a=[2 2 3]
    b=[2 9 9]

    should fail since there are not 2 3s in a.
    It is somewhat ambigous on what to do with duplicate entries.

  • Default User Avatar

    I mean like when I make a loop to the end of the first array it loops around for some reason

  • Default User Avatar

    the c++ tests seem bugged printing the index loops and some incorrect squares

  • Default User Avatar

    Very good contribution. I've updated the description.

    In future, please use a tag like suggestion or issue. In this case, this was actually an issue.

  • Default User Avatar

    I've reworked the description. Is it better? Any suggestions?

  • Custom User Avatar

    There are lowest elements in pairs that can appear multiple times.

    One may add to the description that an element is added only once even it appeared in multiple pairs.

    For example, (6,28) and (6,496) and (28,496) or (84,1488) and (84,1638)

  • Default User Avatar

    very unclear explanation