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.
this very good solution, 👏👏
This comment is hidden because it contains spoiler information about the solution
It seems it is a question rather than an issue.
Did you read carefully this part of the description:
*More*: e and f must result only from sums (or differences) of products between on the one hand (a, b) and on the other (c, d).
If you read the numerous comments below you could have seen that somebody answers at a question similar to yours:
"[5600,19200] doesn't fit the bill if a=b=c=d=100."
I know that the description is not completely clear but it cannot be so unless I give the solution.
Sorry for that!
Note: this result appears in all translations, not only in Go.
[golang]
according to the description
why the test case
Prod2Sum(100, 100, 100, 100)
failed to return[(0,20000),(5600,19200)]
and return only
(0,20000)
you can find that
(5600*5600)+(19200*19200) = ((100*100) + (100*100)) * (100*100) + (100*100))
Quote/white-space/Quantity/white-space/Price/white-space/Status
PS: how can it be possible that your solution is exactly the same as mine?
[Golang]
point1
package kat
should bepackage kata
point 2
Quote/space/Quantity/space/Price/space/Status
"MY SPACE"
so please try to remove this test case, or try to change the description.
point 3
Typo corrected.Thanks.
Golang: the test cases use method
Gcd
which is not required to implement !Getting the following error:
Passed: 44 Failed: 1 Errors: 1 Exit Code: 1
TypeError: Cannot read property 'forEach' of null
at comp
at /home/codewarrior/index.js:42:19
at /runner/frameworks/javascript/cw-2.js:152:11
at Promise._execute
at Promise._resolveFromExecutor
at new Promise
at Object.describe
at /home/codewarrior/index.js:27:10
at /home/codewarrior/index.js:85:5
at Object.handleError
My code does not have 42 lines, besides it works on my IDE. What could the issue be?
I did submit my solution successfully and didn't find it in solutions list
in
Golang
the base code: there is issue with the func name it should be "Comp"thanks @g964 for your reply,
I reviewed my code again and it was my fault.
For which values of n do you got that? If you get
-9.223372036854775e+12
for a given n, your code is clearly false...I tried a few solutions (including Best Pratices ones) and saw no problem. You can see at the top of the page that 46 (out of a total of 1973) guys passed the Go kata. If there had been problems don't you think that somebody would have already seen them?
...............
Since you seem new to CW here are some general guidelines about posts:
Issue: problem in the kata itself (description, wrong tests, wrong internal solution...)
Suggestions: well, that part is clear
Question anything else that is related to you having a problem solving a kata
For information, when you post issues:
provide ALL the useful information:
check, DOUBLE check that this IS an issue, meaning that the problem is in the kata itself and not in your code. If it's in your code, post rather a question
If you pass this step, you still have to prove/explain what the issue is (and if you can provide fixes, it's even better)
I'm using GO 1.11
I found an issues in my solution when i run locally
even after got the Best Practices solution the same issues still exist.