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.
Accidentally left some unused code in
This solution reminded me that you can do endless ranges, stupid me wasted a line on caculating a max number.
think I like this solution the best. It doesn't rely on knowing the quirky math solution and it intuitively describes what the desired logic should be. Well done.
This comment is hidden because it contains spoiler information about the solution
spoiler flag, thx... comments are visible from the dashboard.
This comment is hidden because it contains spoiler information about the solution
Thank you!
Don't modify the input.
Prime numbers are by definiton on the range [2,infinity]. The definition can be taken as a number that has no positive divisors besides itself and 1: -2 is not itself positive so doesn't meet the definition.
Python3, I'm getting:
It should work for random inputs too: '-73,-70,-67,-64,-63,-60--58,-56,-53,-51,-49,-47,-44,-41,-40,-38,-36--33,-31--29,-27,-26,-23--21' should equal ''
It should work for random inputs too: '-68,-65,-62,-59,-57,-54--49,-46--44,-42,-39,-37,-34,-32' should equal ''
It should work for random inputs too: '-97,-95,-93,-90,-87,-84,-81,-80,-77--75,-72,-71,-68,-67,-64,-61,-58,-56,-53,-52,-50,-48,-45,-42,-41,-39' should equal ''
It should work for random inputs too: '-88,-86,-83,-82,-79,-76,-75,-72,-70,-69,-66,-64,-62,-59,-57,-54,-52,-49' should equal ''
It should work for random inputs too: '-68,-65,-62,-59,-56,-53,-50,-49,-47,-46,-44,-43,-41--38,-36,-33,-32,-29,-27,-25,-24,-21,-20,-17--15,-12' should equal ''