Beta
Sum of Power to Indexed Digits
Loading description...
Strings
Regular Expressions
Fundamentals
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.
One line check fixed. Now proper solutions will pass the kata.
Thanks for fixing it!
As I understood from this statement, the sum of digits has to be calculated after applying
pow
(e.g."48" => "16512" => 1 + 6 + 5 + 1 + 2 = 15
) but the tests expect original input's digits to be summed (e.g."48" => 4 + 8 = 12
). This has to be explained clearly.If given string is "123", saying sum of those results (digits raised on their index position), i meant that the sum of 1 + 4 + 27.
But you are right cause if sum of 1+2+3 is even then, sum of 1+4+27 will be even as well.
Nevertheless, I changed description to be more clear. Thanks!
Your one-liner check is incorrect. I'm using a one-liner (arrow-notation method), but still get an error:
You were right. Kata no longers asks for one line solution
I still get the same error!
I'm also getting this, even though I'm not using any local variables (one-line solution) :|
I found out the issue. If your solution is "too good", it detects 0 instead 1 line. Make sure you don't use arrow notation
=>
, butreturn
instead.I started to think it was the
using
part that was the problem, but then I'd have no clue how to solve it :DThere is a solution to every problem ;)
TIL that actually works o_O
TIL what TIL stands for O_°
You can always browse the reference source of .Net.
No random tests.
It has been noted that your previous beta submission also does not have random tests. You should fix the kata that have issues before you start submitted further kata, especially if you have not bothered to create random tests again, even after having been informed that this is an issue for a beta kata. I suggest you unpublish both kata immediately and check out this documentation.
fixed
fixed