Retired
Prime number base conversion (retired)
Loading description...
Mathematics
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.
I would suggest to consider making the return value a string instead of a number, to make a stronger distinction between a value and a representation. For example, the number seven in binary is written as
111
, but its numeric value (i.e. what numeric types are meant to represent) is 7 and not 111. I think that using strings to model a representation would carry the idea better, and additionally would prevent from overflow in languages which have no native support for big integers.Fair enough. I'll implement this change ASAP. Thanks.
2337
both from126 (2 * 3 * 3 * 7)
or851 (23 * 37)
.I'm confused about your issue on random tests, please elaborate
Fair enough, what do I call it?
https://docs.codewars.com/authoring/guidelines/submission-tests#random-tests
Do I necessarily HAVE to add random test cases? Also how do I implement them? (provide a link to an example if you can, please)
I this solution correct? https://www.codewars.com/kata/reviews/679627981960f816858b7d35/groups/6796327f52609bc2c403934a
Examples: Python authoring guide, Authoring examples collection.
I think that naming the thing represented here a "number system" (instead of "number base system") would be okay. Number systems can be irregular in many ways, for example roman numerals, or factoradic system. Not many of them end up in ambiguous representations, true. But I think that if you squint your eyes hard enough, the "numeric system", without "base", would still fit.