본문 바로가기

N퀸1

[백준✨] 3344번 < N-Queen > / Python 문제풀이 / 해답) N = int(input()) ''' 알고리즘의 출처 : https://en.wikipedia.org/wiki/Eight_queens_puzzle 위키 설명 읽고 그대로 코드로 옮겼습니다. The examples above can be obtained with the following formulas.[3] Let (i, j) be the square in column i and row j on the n × n chessboard, k an integer. One approach[3] is 1. If the remainder from dividing n by 6 is not 2 or 3 then the list is simply all even numbers followed by all odd .. 2020. 8. 7.