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.
Ah, I see. I misread the output. Thank you.
Not an issue, the first value is what your function returned, not the input value, for the first one, the input was
"foobar99"
. If you want to see the input value, print it, it'll appear above the test result.I'm solving on Python. The logic I'm seeing in the tests seems to me internally inconsistent. Examples:
I'm also seeing:
Thanks
This comment is hidden because it contains spoiler information about the solution
In Python I get the error.
261998765738225392543588155392 should equal 261998765738225395043321056933
So for small numbers is works pretty good. How can I handle bit int in python?
I have the same issue. Did you figured out what was wrong?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
@dagro - my point was to use your tests to see how much work you can get done before timing out
See how fast you can generate it for a number up to 300,000 and go from there :)
My first successful attempt managed 8.5 seconds for that one number
It took me the better part of 3 evenings to make everything happen in < 7s and I would not have believed it possible at first
This comment is hidden because it contains spoiler information about the solution
Thank you. I checked it. For the number 50 my code needs 349 rounds in the loop and for no. 100 is 723 rounds. Pretty sure, i can make it better. But just to check no. 100 it is one round.
There really are three separate problems to handle
You can intentionally fail your tests at certain points and optimize these portions of your solution separately e.g. by using a single test case with an increasingly higher number or by adding a class variable which counts how many times a function has been called and start returning zeroes after that to fail the test.
This way you will get much better feedback than 'oops, wrong'
Your program should remember what it has and has not done. That's all really ¯\_(ツ)_/¯
But I would also suggest you try your solution with different big inputs. You may be thinking that passing all 5000 tests is your main problem but it is also possible that your code is not efficient enough to compute
performant_numbers(N)
whereN > 150,000
.This comment is hidden because it contains spoiler information about the solution
Thank you for the fast respond. Now I also works fine vor me.
Loading more items...