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.
Fixed now. Thanks!
Each day given should be assumed to have passed in full (an extra 1440 minutes). I'm guessing that you may have overlooked that in the description. Sorry for the confusion!
I added them to various test cases as false because I don't believe that they are perfect numbers.
Just checked and its the same case. 1^4 + 6^4 + 3^4 + 4^4 == 1634. Try checking your code to make sure your exponent is the same as the number's amount of digits. Not sure what is wrong but all the test cases seem to pass correctly. Sorry for not being able to help any further!
It should be to the power of 4 because 1634 is 4 digits long. Sorry for the confusion!
Yes, sorry about that case; I must have overlooked it. Fixed now. Thanks!
Try reading my earlier comment on @donaldsebleung's issue. The problem is with your get_factors method; try researching ways to factor in the most efficient manner. To start with, you can change your n value in xrange to
√n
(figure out how to use sqare roots) and then store both i and n divided by i. Please don't flag as an issue just because you can't solve the problem.This comment is hidden because it contains spoiler information about the solution
Just fixed the wording slightly to a "whether or not a given integer n will produce
a Marsenne prime".Wow thank you. I accidentally loaded the "default example" from codewars and didn't notice the test case. I just fixed all of the problems you mentioned and will add random tests soon. Thank you!
Translated to Java.
Thanks! They're approved now.