6 kyu
Simple Fun #290: Sum Of Threes
144 of 392myjinxin2015
Loading description...
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.
python new test framework is required. updated in this fork
Approved.
Ruby translation should be updated 3.0, see relevent information here: https://github.com/codewars/content-issues/wiki/List-of-Ruby-Kata-to-Update
Enabled in this fork
JavaScript version: I think that the fact that tests include numbers larger than
Number.MAX_SAFE_INTEGER
should be mentioned in kata description.But it's already there? Upper limit for
n
is specified as10^16
, isn't it?Oh, sorry, never mind then, I missed it.
Nice one myjinxin, like all your kata's!
Hello, Testing for: n = 0 Expected: '', instead got: 'Impossible'
May be Expected: 'Impossible'?
Thanks for your feedback ;-) 0 is not a valid input.
1 ≤ n ≤ 10^16
, so it's out of the range. I've checked my code. fixed one place which can generate 0 as input(the probability is very low).Just out of curiosity, why doesn't
n = 2
not yield a sum.3^0+3^0 = 2
, right?Distinct powers of 3. I see.
I can`t slove this: Testing for: n = 243 Expected: '3^5+3^undefined', instead got: '3^5'; Why expected undefined? It is my problem or it is bug?
Okay, I see. Fixed. Thanks for your feedback ;-)
Python, Ruby and Crystal translations delivered, cheers :)
Cheers ;-)