• Same issue in Swift 5.0. After getting attempt test there are many 3 digit input.

  • Fixed

  • Python tests throws up only 4 digit strings.

  • That's not a kata issue, should be reported at the official github repository instead.

  • Favorite short solution, without if condition...

  • Warning in Swift 5.
    Missing example in the description.
    I don't see much point in named arguments when they are called just a and b.

  • Fixed

  • C# as well

  • Needs tests. After I solved it correctly, I went back and was literally able to change the return type to String and still pass.

  • Solved it in Swift, passed all tests, but my solution doesn't show up in the list...

    Clicked on "My Solutions", and it shows up under this:

    Invalid Solutions:

    These solutions originally passed when they were submitted, however the kata's test cases have since been updated and these solutions now no longer pass.

    Wuh? (I did it twice in a row just to make sure the test cases were not actually being updated at the same time I was submitting)

  • You're right, I should have specified. I was also snarkier than I should have been, so apologies for that.

    While I am using Swift, I generalized my comment after reading some of the others with the same complaint.

    A better suggestion would be to edit the description so that it only shows the portion asserting how the input will be formatted to languages where this is true.

  • You should specify the language you're talking about.

    Looks like @f0rg0t is talking about Swift.

  • Reporting again since it's been 8 months since the last one...

    The input will always be a 4 digit string. So there is no need for year string validation

    Nope. Tests are full of 3 (or less) digit strings. Either the description should be changed, or the tests fixed.

    You have options. Pick one.

  • Bringing this up again to make a point...

    No one attempting this kata in Swift 4 can pass the tests, because the tests themselves throw errors.

    In Swift 4, toIntMax() has been completely removed. Unfortunately, it is used extensively in the tests.

    This can be fixed by casting variables to UInt() instead.

    So...

    let length = (range.upperBound - range.lowerBound + 1).toIntMax()

    becomes...

    let length = UInt(range.upperBound - range.lowerBound + 1)

    I had a solution in ~2 minutes, and now I’m left frustrated. Hopefully this can be fixed soon...

  • Loading more items...