Ad
  • Default User Avatar

    That's actually the first fixed test.

  • Default User Avatar

    I can't see any errors.

  • Custom User Avatar

    I can't get your solution to fail with the error you mentioned. It still fails for some inputs with IOOB error (the a(1) in your filter sometimes crashes), but I can't reproduce your original error :(

  • Custom User Avatar

    For the inputs you showed, the correct answer is indeed (449, 457).

    I haven't solved it in Scala, so I can't tell what the problem is. It is possible that Expected and Actual values are reversed (make sure to print what you're returning to make sure this isn't the case). So far 143 users completed it in Scala, so I doubt the tests could be wrong.

  • Default User Avatar

    Test Failed
    Expected "(479,487)", but got "(449,457)"
    Input
    g = 8
    m = 404
    n = 4155

    I have checked and i'm pretty sure my answer is correct, so is it my fault or do the test cases have something wrong?

  • Default User Avatar

    Issue resolved (so it can be published)

  • Custom User Avatar

    I think you missed the digits summing up to at least 25.

  • Default User Avatar

    I see your issue here, we made this kata as a little validation for some of the rules of the original game plus some more created by us. We wanted to make no changes to the original rules if it was possible, and we thought of that possibility, but didn't see it as a strong issue. Do you think is a big problem and we should change it?

  • Default User Avatar

    [Java] At least in the java fixed test the case where the pattern array is empty is not contemplated. So when you attempt the random tests you may pass the kata without checking that condition.

  • Default User Avatar

    Thanks for the help. The test are now changed so they will pass the lowest date possible, being 2100-10-01, which adds up to 5.

  • Custom User Avatar

    Related to the issue below, and a more serious one: the kata is impossible to pass at certain dates due to the same reason causing fixed tests that expect total digit sum to be at least 25 to fail. If YYYYMMDD's digit sum is less than 10 (such as 2030-01-12) this will happen.

  • Custom User Avatar

    It's very easy to test this with

    LocalDate.now(Clock.fixed(Instant.parse( "2024-09-29T00:00:00Z"), ZoneOffset.UTC))
    

    instead of

    LocalDate.now()
    
  • Custom User Avatar

    Okay, an actual issue this time: containing today's date in YYYYMMDD and digit sum being at least 25 is the same condition for certain dates. For example, the date 20240929 adds up to 28, which means if it doesn't exist in the password then the password is invalid, and if it exists then you don't need to check digit sum anymore. So during certain dates the kata will become easier, which is not very future-proof.

  • Custom User Avatar

    Oh okay, I thought the date contains letters.

  • Default User Avatar

    As it's mentioned in the description the today date has the format YYYYMMDD, which all are numbers.
    I don't understand your issue.
    Can you explain yourself?

  • Loading more items...