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.
It'll run as long as you don't change the function name in the initial code.
This kata is 9 years old, quality reviewing in the beta was not strong at the time.
I tried to be more mathematically exact in the description. Could you please check if it is more clear now or suggest some further improvements?
The question is poorly written.
It's unclear what the "parameter" is.
Is it 10 (the "nth" term)
or a series(unspecified)
or the series given as an example
or something else?
Please have someone review your kata before it's published.
PLEASE!
Basic Test Cases
Test Passed
True should equal False
Test Passed
Test Passed
I believe "a" and "c" conform:
1 element each
values are different
lengh of each element string == 1
Why do they not? Help please!
889 is not a prime and the highest number with the most number of even digits is 888.
As given in the question. For n = 1000, the highest prime under 1000 is 887.
The highest number that has maximum no of even digit is 889..right?
Updated to Python 3.11, but your solution is not sufficiently fast.
updated to Python 3.11
No. The output should be screen size, not the ratio. A 32x8 screen is not equivilent to a 4x1 screen.
Huge Values of n (From 100000 up to 1000000)
STDERR
/workspace/default/tests.py:18: DeprecationWarning:
np.bool
is a deprecated alias for the builtinbool
. To silence this warning, usebool
by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, usenp.bool_
here.Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
sieve = numpy.ones(n // 3 + (n % 6 == 2), dtype=numpy.bool)
Execution Timed Out (12000 ms)
Test routine failed to generate large primes:- Problem?
TypeError: find_screen_height() takes 1 positional argument but 2 were give
I pass ONE arg: [1024, "4:3"] i.e.= ONE list with 2 elements
Comment?
217 , ratio solution is 32:8
Should it be reduced to 4:1?
This comment is hidden because it contains spoiler information about the solution
That's a problem with your code, not with the tests. Delete that line.
error in test routine:
Traceback (most recent call last):
File "/workspace/default/tests.py", line 2, in
from solution import digits_product
File "/workspace/default/solution.py", line 15
pass # code away!
^
IndentationError: unindent does not match any outer indentation level
Loading more items...