7 kyu
Pernicious Numbers
335 of 695AcesOfGlory
Loading description...
Arrays
Binary
Algorithms
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
424 / 5.000
Help, please
I can't complete this kata. When I try to check my result, I get this message:
Connection timed out Timed out while loading the runner frame.
Please verify that nothing is preventing access to https://cr.codewars.com, such as ad blockers or firewall rules.
I have already disabled all ad blockers, and my firewall is enabled in my browser.
python new test framework is required. updated in this fork
Approved
Haskell: the reference solution expects
Right []
forn = 2
.I think this Kata should be a Kyu 6 or maybe Kyu 5. In comparison to other Kyu 7 Katas it is costly.
Can't be changed.
This is an idiotic requirement that is also not fulfilable because float range is different from int range. A number bigger than maximum safe ingeter will cause tons of problems.
Haskell : https://www.codewars.com/kumite/5bf9e1a83efceecbbd00014d?sel=5bf9e1a83efceecbbd00014d
Note this is a bit more involved in Haskell because :
Because of this, I did a lot of #3 in the solution setup, I can remove it all if you want, but that really pushes it into a deep yellow for Haskell.
Approved.
Note that Haskell has something better than
toBinary
for this specific use case. It doesn't haveisPrime
in the possible imports, but neither does JavaScript.Nice work on the polymorphism!
In my opinion this is at least 6th lvl kata. It require A LOT of knowledge and practice.
I aggree. You should solve 2 katas (isPrime, hammingWeight) 7 and 6-7 by the way. And we have dozens of much more easier 6th katas from the early codewars days. Not fair at all. Kata voters are dampers.
That is a great kata and I hope being able to solve it in a more glorious way one day (that is to say that my solution is to be improved). Thanks for the riddle.
Cheers, bro!
In the description, the binary representation of 25 is not 11010, it's 11001. I think.
Fixed - my bad. Well observed!
C#-Translation kumited!
https://www.codewars.com/kumite/57aa542053ba33a831001879
Please check and approve it!
(I approved the kata for you! :-))
Something wrong with the test cases in the python version, because I can complete the kata without handling floats (see my solution).
Also, add checking of numbers up to at least 32-64 bits...
Hmm, strange, it gives an error but does not fail the kata...I've not seen this before. I temporarily fixed the problem, any permanent solution?
Well, you can still pass the basic tests without converting to
int
, but the final tests will fail. I would consider it solved.Oh, and it's still missing big number tests...
Nice kata. :-) Thanx.
Cheers, dude :D