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 decided to use a string because there is an existing code golf contest that includes a list of about 58000 sudoku puzzles formatted that way. And it's easier for a user to input a string than a 2d vector.
I redid it in c++, that's way easier because I don't run into timeouts.
I first made it to work with 2d int arrays, but decided that for testing it's easier to work with strings.
oh. apparently they added it to 3.8. you're right.
This seems like a nice 8 kyu kata, maybe higher if the numbers get bigger because multiplying ints gets weird quickly.
If you look at the test cases, it's way easier than in my original kumite:
test.assert_equals(calculate_2048(s), (2**(ss+1),2**(ss+2)-4)) #don't tell the actual solver it's this easy
I just thought my way was more fun.
Nice!
Didn't think of that.
I only started learning python about 2 weeks ago. (with earlier basic experience in PHP from school) so I can't really give you many tips. I did get a lot of useful information from Corey Schafer on Youtube
This comment is hidden because it contains spoiler information about the solution
I'm really annoyed with the 2 space intentation in the unfinished class.
Pressing tab adds 4 spaces, so I had to move everything that was already given up 2 spaces in order to be able to use the automatisc indentation and tabs.