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.
It's not really about finding a formula, but an algorithm to compute the value in less time. The final solution involves quite a bit of both coding and maths.
I, as an amateur coder, found a lot of fun playing with pentomino problems..
So I just wanted to share!!
Thanks
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
bmay be as high as10**18in Big numbers tests. The reference solution should be updated: replacemath.Powwith 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.Powin the solution (float64cannot 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.
Loading more items...