代码如下: class Solution(object): def solveNQueens(self, n): """ :type n: int :rtype: List[List[str]] """ def judge (x,y,own): #判断同行、列、对角线是否有皇后 for i in range(len(own)): if x == own[i][0] or y...