7 kyu
Number of Divisions
1,555 of 3,981fiskenslakt
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.
This one was trickier than it seemed — thanks for the challenge!
Решил задачу, но она все-равно находится в разделе 'unfinished'. Подскажите, в чем может быть проблема?
Scala translation
Approved
CoffeeScript translation
Approved
python new test framework
Approved
Rust has precision errors when applying the formula for calculation...
Can you be more specific, give examples? The reference solution (and several others) uses the formula, doesn't it?
This comment has been hidden.
D translation
Go translation
approved
Rust translation
approved
NASM translation
Approved
C++: random tests can generate
divisor = 1
, which leads to incorrect expected results, and make some valid solutions time out.Random tests in C++ are broken.
Expected: equal to -2147483648
Not possible. Also not responsive to brute-forcing that as a response based on parameters.
The problem is random tests can generate
divisor = 1
. I raise an issue.COBOL translation (author inactive).
approved
Python: Attempt tests should include fixed cases (at least the sample cases).
Added some time ago
Not fixed yet, reraising:
And at least in Python the reference solution is incorrect and this case is within the generated range.
C++ translation kumited
C translation kumited.
approved :)
R translation kumited.
Am I doing this right? ;))
Ruby translation kumited.
; ) )
Approved
Minor modifications done on the description.
Solutions using floating point numbers may fail because of precision issues, like in
test.assert_equals(divisions(2**100 - 1, 2), 99)
Either there should always be some tests to make sure they always fail or there should not be a non-zero probability of generating such tests to make sure they pass.This comment has been hidden.