Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Not checking more than once if a number is prime could help. :P
Python: even with a quick search for prime numbers, the task is output Execution Timed Out (12000 ms)
Thanks guys. I figured it out, but I still don't pass the executionTimeout test (12000 ms) 🙃
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.
In Python the error message format is:
what_your_code_returned
should equalwhat_the_kata_correct_solution_is
So here, your code is returning
'short.ly/aaac'
but the correct answer is'short.ly/aaad'
What's this means? Should work with same long URLs: 'short.ly/aaac' should equal 'short.ly/aaad' 🤯