Ad
  • Custom User Avatar

    The test is perfectly valid since the kata does not specify any constraints on character range, a.k.a any character is to be expected and handled gracefully

  • Custom User Avatar

    This is not a performance or advanced version, so no need such tests with such huge inputs & different languages have different overflow boundaries so unapplicable.

  • Custom User Avatar

    The he/she would need to make sure it doesn't overflow. Also the code for the challange would have to be rewritten a but.
    Tho, it would be cool to have as an extre or something you can use in the test like if it was // out at the start.

  • Default User Avatar

    Refactoring causes a ton of duplicate solutions being posted. Is there no way to edit a solution without creating a duplicate? There should be.

  • Custom User Avatar

    I made the examples language agnostic instead (most o the languages were missing anyway... :/ )

  • Custom User Avatar
  • Custom User Avatar

    Hi,

    You actually need to find a better way to solve this. Your code is pretty slow on big inputs (imagine if n=10**20?). Advise: completely drop the loop part and find something better.

    Note: this is actually a "question", not an "issue" => closing the "issue" aspect (the "issue" label is used for a problem with the kata itself, not for a user having troubles with his solution)

    cheers

  • Custom User Avatar

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

  • Custom User Avatar

    Shouldn't the test validate_pin("a234") == False be invalid for this task since an ATM doesn't have alpha characters as input keys?

  • Custom User Avatar

    Pleae add this as a default test:

    test.assert_equals(is_square(152415789666209426002111556165263283035677490), False, "152415789666209426002111556165263283035677490 is not a square number")
    
  • Default User Avatar

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