You may want to use B4B's module blocker instead, I think it prohibits these kind of solutions from passing. Include libraries that read from system or http requests while you are at it; req, pip, .. (not sure which ones)
I have explained that idea in the description - while the forth smallest value is -9, you may sum all the values in the array that are between -9 to 39 (included). Because you have two more values of -9 the sum is 58 and not 76.
I don't have a ref at hand. You could poke him on Discord.
You may want to use B4B's module blocker instead, I think it prohibits these kind of solutions from passing. Include libraries that read from system or http requests while you are at it; req, pip, .. (not sure which ones)
...or just lean back and accept defeat :-D
Or make a whitelist of allowed modules, such as math, functools, itertools, perhaps also numpy. I don't know what's the best option.
is good
OK
You should keep duplicates.
I still don't understand this kata.
I also corrected the random test which always returned True.
I have explained that idea in the description - while the forth smallest value is -9, you may sum all the values in the array that are between -9 to 39 (included). Because you have two more values of -9 the sum is 58 and not 76.
See the last example, you need to add two -9s more, 76 - 18 = 58.