Ad
  • Default User Avatar

    So is this a "real" issue of kata but not a bug in user's code? I just want to make sure if I should solve it by working hard at codes of client side.

  • Custom User Avatar

    It doesn't even matter in Python. Duck-typing is standard practice, so for all we know, we treat False as 0.

    The fact that you're seeing False should equal 1 is just due to their representations (either str or repr) being different, which doesn't have anything to do with equality check. Just like 20 in double is the same as 20 in integer or fraction, even if their representation are different (20.0 to 20).

  • Default User Avatar

    An example of the input line above, my code says that there is no way out of the maze, but the test says that there is a way out. I can provide my code for analysis so that you can verify that the string is interpreted correctly.

  • Custom User Avatar

    the line has no solution

    And how do you know that? Are you sure you're interpreting the messages correctly? Specially for you, just to be 200% sure I've looked through the "snake" cases, and they are all correct.

  • Default User Avatar

    I output the input line in via "std :: cout << maze" to analyze my mistakes, the line has no solution (false), but the test says that you can reach the end of the maze (true).

  • Custom User Avatar

    your test says that there is a way out of this labyrinth, but according to the logs it is not

    What logs? This is a valid test.

  • Default User Avatar

    .W...W...W...\n
    .W.W.W.W.W.W.\n
    .W.W.W.W.W.W.\n
    .W.W.W.W.W.W.\n
    .W.W.W.W.W.W.\n
    .W.W.W.W.W.W.\n
    .W.W.W.W.W.W.\n
    .W.W.W.W.W.W.\n
    .W.W.W.W.W.W.\n
    .W.W.W.W.W.W.\n
    .W.W.W.W.W.W.\n
    .W.W.W.W.W.W.\n
    ...W...W...W..............\n
    WWWWWWWWWWWW.\n
    .............\n
    .WWWWWWWWWWWW\n
    .............\n
    WWWWWWWWWWWW.\n
    ......W......\n
    .WWWWWWWWWWWW\n
    .............\n
    WWWWWWWWWWWW.\n
    .............\n
    .WWWWWWWWWWWW\n
    ..........................\n
    WWWWWWWWWWWW.\n
    .............\n
    .WWWWWWWWWWWW\n
    .............\n
    WWWWWWWWWWWW.\n
    .............\n
    .WWWWWWWWWWWW\n
    .............\n
    WWWWWWWWWWWW.\n
    .............\n
    .WWWWWWWWWWWW\n
    .............

    I solve kata on c ++, your test says that there is a way out of this labyrinth, but according to the logs it is not. Comment on this case if this is a task error or mine tell me what to do next.

  • Default User Avatar

    This argument might be trival, but how about using True==True and False==False directly?

  • Custom User Avatar

    Because False == 0 and True == 1.

  • Default User Avatar

    Hi guys,

    I am working on the Python version and in 490 random test case I can past about 480. The other 10 get the results of "False should equal 1". From the instruction, the return value of function is either True or False, I don't understand why "1" is expected in test case. Did I miss something important?

    Appreicate your inputs.

    Frank

  • Default User Avatar

    Thanks, looks like I don't need to check that:)

  • Custom User Avatar

    Because you don't understand the regional rule. If it was on paper, it'd look like this:

    5 3 4 | 6 7 8 | 9 1 2
    6 7 2 | 1 9 5 | 3 4 8
    1 9 8 | 3 4 2 | 5 6 7
    ------+-------+------
    8 5 9 | 7 6 1 | 4 2 3
    4 2 6 | 8 5 3 | 7 9 1
    7 1 3 | 9 2 4 | 8 5 6
    ------+-------+------
    9 6 1 | 5 3 7 | 2 8 4
    2 8 7 | 4 1 9 | 6 3 5
    3 4 5 | 2 8 6 | 1 7 9

  • Default User Avatar

    My understanding of the regional rule is that in the 3x3 region there should be 1 to 9 and no duplicates. But the first test case confuses me. The region of cell[row=1, col=0] (upper left cell) and cell[row = 3, col=2] are [6,7,2
    1,9,8,
    8,5,9].

    Both 8 and 9 appear twice but 0 and 3 are missing. Why the result is "Finished!"?

      new object[]
      {
        "Finished!",
        new int[][]
        {
          new int[] {5, 3, 4, 6, 7, 8, 9, 1, 2}, 
          new int[] {6, 7, 2, 1, 9, 5, 3, 4, 8},
          new int[] {1, 9, 8, 3, 4, 2, 5, 6, 7},
          new int[] {8, 5, 9, 7, 6, 1, 4, 2, 3},
          new int[] {4, 2, 6, 8, 5, 3, 7, 9, 1},
          new int[] {7, 1, 3, 9, 2, 4, 8, 5, 6},
          new int[] {9, 6, 1, 5, 3, 7, 2, 8, 4},
          new int[] {2, 8, 7, 4, 1, 9, 6, 3, 5},
          new int[] {3, 4, 5, 2, 8, 6, 1, 7, 9},
        },
      },
    
  • Default User Avatar

    Update: I realized that there is inefficient steps causing time out.

    Hello,

    I am using python3 and can pass all basic tests. But in "Attempt" phase, a STDERR appeared saying "Process was terminated. It took longer than 12000ms to complete". Since the test case is withheld at this moment, ithe size of array is unknown. Is there any possibility that the calculation time could exceed 12 seconds? What's the largest size of array in test case?

    Thanks,
    Frank