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.
Maybe you wanna use Euler’s totient theorem states. It may help!
Checkout my solution, I managed to do it without the math package. XD
Approved
Six days later :P Nice! :D
Nice job, later you check the 7x7 exercise https://www.codewars.com/kata/5917a2205ffc30ec3a0000a8/
There is so much more to optimize! :)
Done after further taking those 30 seconds into 0.01seconds :D
Great kata!
PS: The comments regarding "medved test" made me concerned that there were some extremly hard tests which would break/slow my solution. There was no such test in Go but Very Hard Problems were much harder to solve than "medved tests" found in other languages.
Optimize, for one input, from 30 seconds into 0.5 seconds... still not good enough :D
This comment is hidden because it contains spoiler information about the solution
Fixes
It(desc, closure())
closure() variable capture which made thecan solve 6x6 puzzle
tests repeat the same test three or four times.Does anyone have a simple explanation of the solution?
It's clear the exponent has to be calculated using a module multiple of four but I don't understand the maths how this is achieved.
Go translation fix
The random tests in Go are not random due to missing random seed initialization.
Some code clean up, fixed Go dot imports of standard library packages which is not standard and reformated the code with gofmt/vscode.
Fixed random tests not being random, rand.Seed() was missing.
Cleaned up the import
. "math"
for the standard library which is not standard.Reformated code in VSCode which use gofmt to use the standard formating.
This comment is hidden because it contains spoiler information about the solution
I'm getting timeout error. I've modified my code several times but i get the same errror
math. don't brute force
Loading more items...