comefrom: <doocs>0688.Knight Probability in Chessboard_1.py
code: def knightProbability( n: int, k: int, row: int, column: int) -> float:
      dp = [[[0] * n for _ in range(n)] for _ in range(k + 1)]
      for l in range(k + 1):
          for i in range(n):
              for j in range(n):
                  if l == 0:
                      dp[l][i][j] = 1
                  else:
                      for a, b in (
                          (-2, -1),
                          (-2, 1),
                          (2, -1),
                          (2, 1),
                          (-1, -2),
                          (-1, 2),
                          (1, -2),
                          (1, 2),
                      ):
                          x, y = i + a, j + b
                          if 0 <= x < n and 0 <= y < n:
                              dp[l][i][j] += dp[l - 1][x][y] / 8
      return dp[k][row][column]
masked: def sample_funcname ( var_0 : int , var_1 : int , var_2 : int , var_3 : int ) -> float :
      var_5 = [ [ [ 0 ] * var_0 for var_4 in range ( var_0 ) ] for var_4 in range ( var_1 + 1 ) ]
      for var_6 in range ( var_1 + 1 ) :
          for var_7 in range ( var_0 ) :
              for var_8 in range ( var_0 ) :
                  if var_6 == 0 :
                      var_5 [ var_6 ] [ var_7 ] [ var_8 ] = 1
                  else :
                      for var_9 , var_10 in ( ( - 2 , - 1 ) , ( - 2 , 1 ) , ( 2 , - 1 ) , ( 2 , 1 ) , ( - 1 , - 2 ) , ( - 1 , 2 ) , ( 1 , - 2 ) , ( 1 , 2 ) , ) :
                          var_11 , var_12 = var_7 + var_9 , var_8 + var_10
                          if 0 <= var_11 < var_0 and 0 <= var_12 < var_0 :
                              var_5 [ var_6 ] [ var_7 ] [ var_8 ] += var_5 [ var_6 - 1 ] [ var_11 ] [ var_12 ] / 8
      return var_5 [ var_1 ] [ var_2 ] [ var_3 ]
  