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.
you should initialize the result like this result := make([]int, 0)
Better to simplify first: lcm will be smaller.
Hey @enricodallastella - no worries! I see now better what is happening - I was confused also, when I tried those tests using my Python solution. I'm guessing that your Go code is returning this solution:
[[36156, 68120], [4524, 68120], [51090, 68120]]
? This is what my old Python solution produces also.The reason for the confusion seems to be what is stated in the Note section of the kata description: "Newer translations have some reducible fractions. To be on the safe side it is better to do a bit more work by simplifying fractions even if they don't have to be."
So in the example that is causing problems, once you have obtained the above result, you may have to perform 1 more simplification step: here for example you can see that the numerators and denominator that you get are all divisible by
2
, so you can divide all the terms in the fractions - that is where the final value34060
is coming from.Sorry, no errors in the tsts.
Hey @enricodallastella - which language are you working in? There are dozens available.
In fact, can you copy-paste the specific test that you think is wrong - it's much clearer to report bugs if you actually provide the direct evidence, because now people have to guess which one you are referring to, and what the problem may or may not be etc etc.
Here's an example of how a useful Issue report might look like:
"In {programming language X} there is a Fixed Test with input:
a = [[11, 111], [515, 555], [11135, 1151]]
which expects correct answer
b = [[2134, 84], [21358, 8554], [17, 8134]]
but I think this is incorrect because of {justified explanation}"
edit to avoid confusion: the above
a
andb
are random numbers, not correct values for this kata.