Draft
Between a and b
247 of 2911mpr3za
Loading description...
Mathematics
Algorithms
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.
Java translation(author inactive)
Description too poor!
I agree with ds_one, this kata's description needs much more explaination. I got majority of solutions right. Those I did not, I have no idea why.
Description needs a lot more information. product(1, 3) Expected: 2, instead got: 4 What.
There's only 2 in-between.
Yes, and why does your code return
2 * 2
instead of2
?Because the description does not make clear that when there is only one number in-between to just return that number as is. Quite the opposite, either it's the product of the 2 by itself as return value (hence 4) or "impossible" because there are no two numbers to multiplay with each other and should therefore return "Error". As I said, the description lacks information on that part.
Returning values of different data types is a bad design.
Calculating the product of integers in range
(a; b)
is the same as calculating the product of integers in range[a; b]
.Did you mean "isn't the same"?
No? At least I see no difference between:
Edit: clarification - this is a duplicate.
This kata is more like guessing instead of coding - i think the explanation how to resolve it should to have more clues.
This issue is more like guessing vs resolving - the explanation of how to resolve it sohuld to have more clues.
why not to use just long? Don't see any need in BigInteger
Hi Maksim,
Why did you mark it as issue?
Are you sure, that 'long' will be enough for the following test input: for example a = 1, b = 900?
I agree to Dentzil. This is no issue.
The author or Maksim should close it!
Rather than returning 'Error', it would be better to throw Error('Error') in Javascript.
That is more of a suggestion vs issue.
Already fixed JS version. The author did not handle precision control and his/her approach to this kata seems unwise to me.
This should be an issue.
And another problem is I always failed at the big number
please fix it by limiting to small numbers or allowing percentage error
C#-Translation kumited!
https://www.codewars.com/kumite/57780c39ce5d56a032000c3e
Please check and approve!
For some range of numbers (e.g.
[9,26]
), there is a rounding issue that makes my code fail.Expected: 42744736671436790000, instead got: 42744736671436800000
Here's part of my solution:
Needs random test cases
thx, I did it.