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.
Could you provide more details about the algorithm you are using? It's absolutely possible to pass al the test in under 5 seconds,but it will be difficult to determine what the problem is in your case without having any details about the code, however, here are some general recomendations:
Converting to int(x) wont work, as the numbers are too large (Even tough the documentation says python's integers are arbitary presicion, they are not)
Utilizing any loop will be too slow for this kata, as even 1 loop will create time complexity of O(n), and you need O(1)
Do some research about libraries that spetialize on handling big numbers
This comment is hidden because it contains spoiler information about the solution
The expected value is always a number.
you have some if/else branches missing a
retrun