Ad
  • Custom User Avatar

    Not checking more than once if a number is prime could help. :P

  • Custom User Avatar

    Python: even with a quick search for prime numbers, the task is output Execution Timed Out (12000 ms)

  • Custom User Avatar

    Thanks guys. I figured it out, but I still don't pass the executionTimeout test (12000 ms) 🙃

  • Default User Avatar

    Hi @Anton-Kim - I just solved this kata, to be able to give you clearer answer:

    Your test/error message occurs when you are given the same URL twice, and you are supposed to therefore identify that you have already assigned a code to that URL and therefore you must return the same code

    For example, if you are given as input "google.com" and you assign it code "aaac", then any following query for "google.com" input must return the same code "aaac", rather than assigning it a new one like "bfxz" for example.

  • Default User Avatar

    In Python the error message format is:

    what_your_code_returned should equal what_the_kata_correct_solution_is

    So here, your code is returning 'short.ly/aaac' but the correct answer is 'short.ly/aaad'

  • Custom User Avatar

    What's this means? Should work with same long URLs: 'short.ly/aaac' should equal 'short.ly/aaad' 🤯