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.
赞
This solution is incorrect for composite numbers divisible by numbers other than 2 or 3. 64603 isn't prime because it is divisible by 7, but returns True.
Nice kata !!!
You can do it better:
def prod(arr):
if arr:
return max(accumulate(arr, mul))
return 1
for sure, my mistake
...the salary of some workers is unknown and hence represented as "-".
this breaks if there is any other non-numeric char besides '-' EDIT: facepalm
Nice kata!
+1
Additional test cases added
Nice kata !!!
This comment is hidden because it contains spoiler information about the solution
I was inattentive...
Your own tests prove that you're wrong...
Faster than slicing
https://github.com/deedy5/Learning_Python/blob/master/TESTS/reverse_number_test.py
Loading more items...