Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
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.
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.
Yes, and why does your code return
2 * 2
instead of2
?Description needs a lot more information.
product(1, 3)
Expected: 2, instead got: 4
What.
There's only 2 in-between.
This kata is more like guessing instead of coding - i think the explanation how to resolve it should to have more clues.
I agree to Dentzil. This is no issue.
The author or Maksim should close it!
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?
Rather than returning 'Error', it would be better to throw Error('Error') in Javascript.
Already fixed JS version. The author did not handle precision control and his/her approach to this kata seems unwise to me.
please fix it by limiting to small numbers or allowing percentage error
This should be an issue.
And another problem is I always failed at the big number
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:
Loading more items...