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.
Scala translation
Chai + assert for CoffeeScript
Ruby 3.0 should be enabled, see this to learn how to do it
`each': failed to allocate memory (NoMemoryError)
If I get a error of:
Process terminated, took too long to complete (6000ms)
Could it be that my personal machine just can't go through all the random tests fast enough to count as complete?
something's wrong with the submission tests. I keep getting errors similar to "f(80422915, 97213654) 7143025344789318.0 should equal 3233922668760070.0"
but my code returns the correct value (e.g. 3233922668760070.0)… easily verified by creating a local test in the editor
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Where can I go to learn more about how to speed code up? It would be great if helpful resources were pointed out! Cheers!
The problem only makes sense in the context of integer numbers (n and m must be integer numbers).
However, the random tests don't always use integer type, they use inputs such as 837461239.0, which is a float.
That is misleading, and cause unnecessary headaches.
Please be consistent, if the random tests are going to be float, then all tests must be.
keep getting "unknown error" or memory error from large number input
f(83065750, 36664444)
83065750.0 36664444.0
Traceback:
in
in f
MemoryError
my code on this kata isn't able to get the same result like code running on my computer....
Your test in Python is broken because you implemented your own version of randint that returns floats. Semicolons aren't used in Python either. Please fix as below:
from random import randint
n, m = randint(min, max), randint(min, max)
Excuse me, but I presume the Python version has some problem with testing: I tried my code elsewhere and it works just fine (the solution it gives me matches the one suggested by the failed test), but no matter how many times I try, the tests are always off.
Plus I don't get why it returns float results, but that is the lesser issue here.
Could you check about that?
Edit: basically the same exact code works perfectly fine on JS.
Loading more items...