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.
I updated the Go translation myself.
The author does not have to be active for a translation to get accepted.
See my reply above. Please create a new fork of your translation with all updates. I will check it and approve it.
This comment is hidden because it contains spoiler information about the solution
b
may be as high as10**18
in Big numbers tests. The reference solution should be updated: replacemath.Pow
with repeated multiplication. You may also increase the number of tests but I don't think it is necessary.Go random tests expect incorrect results for large numbers. Do not use
math.Pow
in the solution (float64
cannot be used for integers larger than$2^{53}$
).An example:
I added it.
Approved
This comment is hidden because it contains spoiler information about the solution
Yes, I do.
i think, this line - "for num, color in zip(range(number, number+3), (2, 1, 1)):"
should be like this - "for num, color in zip(range(number, number+3), (2, 1, 0)):"
I don't do Go at all, so I can't be of any technical help, sorry.
Ok, I found the reason: the random tests still pass because they don't just compare the output string against another (because several solutions may be possible), so the leading and trailing new lines, which are just about formatting, don't cause problems. The fixed tests, on the other hand, fail because the strings are different.
your code is passing with just this, tho:
return "\n".join(map(''.join,theMap))
(I just checked, both against the full test suite and the sample tests)Hi,
There are actually neither leading nor trailing new lines in the outputs. The data in the sample tests might be misleading, but all the multiline strings are stripped at one point or the other.
Loading more items...