6 kyu
Basic Optimization - Collatz Sum Sequence
43Dr Gabo
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.
I don't get it. What do you want us to sum up? Please show an example with the result.
approved at 6 kyu: ranking votes
use katex
f(n) = \frac{n}{2} \quad \text{if } n \equiv 0 \pmod{2}\\ f(n) = 3n + 1 \quad \text{if } n \equiv 1 \pmod{2}
done. thanks.
python new test frameworks
approved by someone.
The specified upper bound is
2 * 10**7
, but it's only2 * 10**6
in the tests.I can't find any reference to that 2* 10**7 that you mention, the description says that inputs are in the range
[1, 2*10e6]
.10e6 == 10 * 10**6 == 10**7
Corrected! It was a dumb mistake :p
Is this any different than all the other Collatz conjecture katas?
This comment has been hidden.
(spoilerless answer)
I think so. This exercise happens to use the sequence, but calculating the length is not the real problem.
Well, why not then.