7 kyu
Give me a Crazy Formula!
209 of 297Arthur GC
Loading description...
Mathematics
Algorithms
Puzzles
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.
this challenge pushed me write fast algorithm, amazing
Great Kata...though my code get too large but ..
Python translation. Please, review and approve (the author is inactive).
It should be stated that other steps should still apply if this condition is true.
It's "subtract", not "reduce".
In the initial solution the brackets and white-space are inconsistent. It would be better like this:
There are no random tests.
Added random test.
I was struggling a bit, but author of this Kata has given me excellent explanation - i suggest to check my issue if someone of you are struggling too.
in the code , "public static" should be "public"
Thanks for the feedback. Fixed!
Hi - could you help me with this kata please - 77633658797932970 split into 77633658 - 7 + 97932970 = 175566621 => 1755^2 + 6 + 6621 = 3086652 => 308 + 6 - 652 = -338 => -3 - 3 + 8 = 2 / how this is possible that the result is 8?
@AdmiralRobinson, I'll help you, below is why the result is 8:
77633658797932970, middle number is odd (7), so we reduce it (second rule): 7+7+6+3+3+6+5+8(-7)+9+7+9+3+2+9+7+0 = 84
84, there isn't a middle number in it and n > 9 so we remove the last digit (first rule) => 8
So 8 is the answer.