Ad
  • Custom User Avatar

    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.

  • Custom User Avatar

    I redid it in c++, that's way easier because I don't run into timeouts.

  • Custom User Avatar

    I first made it to work with 2d int arrays, but decided that for testing it's easier to work with strings.

  • Custom User Avatar

    oh. apparently they added it to 3.8. you're right.

  • Custom User Avatar

    This seems like a nice 8 kyu kata, maybe higher if the numbers get bigger because multiplying ints gets weird quickly.

  • Custom User Avatar

    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.

  • Custom User Avatar

    Nice!
    Didn't think of that.

  • Custom User Avatar

    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

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    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.