Post History
Sandbox
8 coexisting queens [FINALIZED]
#7: Post edited
8 coexisting queens
- 8 coexisting queens [FINALIZED]
- This is a fixed output challenge. Output a textual representation of a chessboard hosting 8 queens, none of which are attacking each other.
- There are 92 ways of arranging them, 12 if rotations and reflections are discounted. You may choose any 1 of these arrangements.
- You are not required to calculate or search for a valid arrangement. Hardcoding your choice of arrangement is one possible valid solution.
- ## Input
- - There is no input for this challenge
- ## Output
- - 8 newline separated lines of 8 characters, with an optional trailing newline
- - Each character is either a queen or an empty square. You may choose any two distinct characters to represent a queen and an empty square
- - No more than 1 queen appears in each row, column, and diagonal
- - There are 8 queens in total
- - Your output must be the same each time (your code must have deterministic output, even if it uses a probabilistic approach internally)
- ## Examples
- The examples show a queen as `Q` and an empty square as `#`. There are 12 examples, one for each of the fundamental solutions (before rotation and reflection). Any combination of rotating and reflecting one of these examples is also a valid solution.
- ```text
- ###Q####
- ######Q#
- ##Q#####
- #######Q
- #Q######
- ####Q###
- Q#######
- #####Q##
- ####Q###
- #Q######
- ###Q####
- ######Q#
- ##Q#####
- #######Q
- #####Q##
- Q#######
- ###Q####
- #Q######
- ######Q#
- ##Q#####
- #####Q##
- #######Q
- ####Q###
- Q#######
- ###Q####
- #####Q##
- #######Q
- ##Q#####
- Q#######
- ######Q#
- ####Q###
- #Q######
- ##Q#####
- #####Q##
- #######Q
- Q#######
- ###Q####
- ######Q#
- ####Q###
- #Q######
- ####Q###
- ##Q#####
- #######Q
- ###Q####
- ######Q#
- Q#######
- #####Q##
- #Q######
- ####Q###
- ######Q#
- ###Q####
- Q#######
- ##Q#####
- #######Q
- #####Q##
- #Q######
- ###Q####
- Q#######
- ####Q###
- #######Q
- #####Q##
- ##Q#####
- ######Q#
- #Q######
- ##Q#####
- #####Q##
- ###Q####
- Q#######
- #######Q
- ####Q###
- ######Q#
- #Q######
- #####Q##
- #Q######
- ######Q#
- Q#######
- ###Q####
- #######Q
- ####Q###
- ##Q#####
- ###Q####
- ######Q#
- Q#######
- #######Q
- ####Q###
- #Q######
- #####Q##
- ##Q#####
- #####Q##
- ###Q####
- ######Q#
- Q#######
- #######Q
- #Q######
- ####Q###
- ##Q#####
- ```
- The 12 fundamental solutions were taken from the [Wikipedia page for the 8 queens puzzle](https://en.wikipedia.org/wiki/Eight_queens_puzzle#Constructing_and_counting_solutions_when_n_=_8) which also provides them as images:
- [![The 12 fundamental solutions to the 8 queens puzzle](https://codegolf.codidact.com/uploads/WA6gMm476tdsgfbzPQHTPdUF)](https://en.wikipedia.org/wiki/Eight_queens_puzzle#Constructing_and_counting_solutions_when_n_=_8 "View the images on Wikipedia")
- ## Scoring
- Despite there being 92 valid outputs, this is a standard code golf challenge. Your score is the number of bytes in your code.
- > Explanations in answers are optional, but I'm more likely to upvote answers that have one.
- # Now posted: [8 coexisting queens](https://codegolf.codidact.com/posts/287108)
- ---
- This is a fixed output challenge. Output a textual representation of a chessboard hosting 8 queens, none of which are attacking each other.
- There are 92 ways of arranging them, 12 if rotations and reflections are discounted. You may choose any 1 of these arrangements.
- You are not required to calculate or search for a valid arrangement. Hardcoding your choice of arrangement is one possible valid solution.
- ## Input
- - There is no input for this challenge
- ## Output
- - 8 newline separated lines of 8 characters, with an optional trailing newline
- - Each character is either a queen or an empty square. You may choose any two distinct characters to represent a queen and an empty square
- - No more than 1 queen appears in each row, column, and diagonal
- - There are 8 queens in total
- - Your output must be the same each time (your code must have deterministic output, even if it uses a probabilistic approach internally)
- ## Examples
- The examples show a queen as `Q` and an empty square as `#`. There are 12 examples, one for each of the fundamental solutions (before rotation and reflection). Any combination of rotating and reflecting one of these examples is also a valid solution.
- ```text
- ###Q####
- ######Q#
- ##Q#####
- #######Q
- #Q######
- ####Q###
- Q#######
- #####Q##
- ####Q###
- #Q######
- ###Q####
- ######Q#
- ##Q#####
- #######Q
- #####Q##
- Q#######
- ###Q####
- #Q######
- ######Q#
- ##Q#####
- #####Q##
- #######Q
- ####Q###
- Q#######
- ###Q####
- #####Q##
- #######Q
- ##Q#####
- Q#######
- ######Q#
- ####Q###
- #Q######
- ##Q#####
- #####Q##
- #######Q
- Q#######
- ###Q####
- ######Q#
- ####Q###
- #Q######
- ####Q###
- ##Q#####
- #######Q
- ###Q####
- ######Q#
- Q#######
- #####Q##
- #Q######
- ####Q###
- ######Q#
- ###Q####
- Q#######
- ##Q#####
- #######Q
- #####Q##
- #Q######
- ###Q####
- Q#######
- ####Q###
- #######Q
- #####Q##
- ##Q#####
- ######Q#
- #Q######
- ##Q#####
- #####Q##
- ###Q####
- Q#######
- #######Q
- ####Q###
- ######Q#
- #Q######
- #####Q##
- #Q######
- ######Q#
- Q#######
- ###Q####
- #######Q
- ####Q###
- ##Q#####
- ###Q####
- ######Q#
- Q#######
- #######Q
- ####Q###
- #Q######
- #####Q##
- ##Q#####
- #####Q##
- ###Q####
- ######Q#
- Q#######
- #######Q
- #Q######
- ####Q###
- ##Q#####
- ```
- The 12 fundamental solutions were taken from the [Wikipedia page for the 8 queens puzzle](https://en.wikipedia.org/wiki/Eight_queens_puzzle#Constructing_and_counting_solutions_when_n_=_8) which also provides them as images:
- [![The 12 fundamental solutions to the 8 queens puzzle](https://codegolf.codidact.com/uploads/WA6gMm476tdsgfbzPQHTPdUF)](https://en.wikipedia.org/wiki/Eight_queens_puzzle#Constructing_and_counting_solutions_when_n_=_8 "View the images on Wikipedia")
- ## Scoring
- Despite there being 92 valid outputs, this is a standard code golf challenge. Your score is the number of bytes in your code.
- > Explanations in answers are optional, but I'm more likely to upvote answers that have one.
#6: Post edited
- This is a fixed output challenge. Output a textual representation of a chessboard hosting 8 queens, none of which are attacking each other.
There are 92 ways of arranging them, 12 if rotations and reflections are discounted. You may choose any of these arrangements.- You are not required to calculate or search for a valid arrangement. Hardcoding your choice of arrangement is one possible valid solution.
- ## Input
- - There is no input for this challenge
- ## Output
- - 8 newline separated lines of 8 characters, with an optional trailing newline
- - Each character is either a queen or an empty square. You may choose any two distinct characters to represent a queen and an empty square
- - No more than 1 queen appears in each row, column, and diagonal
- - There are 8 queens in total
- - Your output must be the same each time (your code must have deterministic output, even if it uses a probabilistic approach internally)
- ## Examples
- The examples show a queen as `Q` and an empty square as `#`. There are 12 examples, one for each of the fundamental solutions (before rotation and reflection). Any combination of rotating and reflecting one of these examples is also a valid solution.
- ```text
- ###Q####
- ######Q#
- ##Q#####
- #######Q
- #Q######
- ####Q###
- Q#######
- #####Q##
- ####Q###
- #Q######
- ###Q####
- ######Q#
- ##Q#####
- #######Q
- #####Q##
- Q#######
- ###Q####
- #Q######
- ######Q#
- ##Q#####
- #####Q##
- #######Q
- ####Q###
- Q#######
- ###Q####
- #####Q##
- #######Q
- ##Q#####
- Q#######
- ######Q#
- ####Q###
- #Q######
- ##Q#####
- #####Q##
- #######Q
- Q#######
- ###Q####
- ######Q#
- ####Q###
- #Q######
- ####Q###
- ##Q#####
- #######Q
- ###Q####
- ######Q#
- Q#######
- #####Q##
- #Q######
- ####Q###
- ######Q#
- ###Q####
- Q#######
- ##Q#####
- #######Q
- #####Q##
- #Q######
- ###Q####
- Q#######
- ####Q###
- #######Q
- #####Q##
- ##Q#####
- ######Q#
- #Q######
- ##Q#####
- #####Q##
- ###Q####
- Q#######
- #######Q
- ####Q###
- ######Q#
- #Q######
- #####Q##
- #Q######
- ######Q#
- Q#######
- ###Q####
- #######Q
- ####Q###
- ##Q#####
- ###Q####
- ######Q#
- Q#######
- #######Q
- ####Q###
- #Q######
- #####Q##
- ##Q#####
- #####Q##
- ###Q####
- ######Q#
- Q#######
- #######Q
- #Q######
- ####Q###
- ##Q#####
- ```
- The 12 fundamental solutions were taken from the [Wikipedia page for the 8 queens puzzle](https://en.wikipedia.org/wiki/Eight_queens_puzzle#Constructing_and_counting_solutions_when_n_=_8) which also provides them as images:
- [![The 12 fundamental solutions to the 8 queens puzzle](https://codegolf.codidact.com/uploads/WA6gMm476tdsgfbzPQHTPdUF)](https://en.wikipedia.org/wiki/Eight_queens_puzzle#Constructing_and_counting_solutions_when_n_=_8 "View the images on Wikipedia")
- ## Scoring
- Despite there being 92 valid outputs, this is a standard code golf challenge. Your score is the number of bytes in your code.
- > Explanations in answers are optional, but I'm more likely to upvote answers that have one.
- This is a fixed output challenge. Output a textual representation of a chessboard hosting 8 queens, none of which are attacking each other.
- There are 92 ways of arranging them, 12 if rotations and reflections are discounted. You may choose any 1 of these arrangements.
- You are not required to calculate or search for a valid arrangement. Hardcoding your choice of arrangement is one possible valid solution.
- ## Input
- - There is no input for this challenge
- ## Output
- - 8 newline separated lines of 8 characters, with an optional trailing newline
- - Each character is either a queen or an empty square. You may choose any two distinct characters to represent a queen and an empty square
- - No more than 1 queen appears in each row, column, and diagonal
- - There are 8 queens in total
- - Your output must be the same each time (your code must have deterministic output, even if it uses a probabilistic approach internally)
- ## Examples
- The examples show a queen as `Q` and an empty square as `#`. There are 12 examples, one for each of the fundamental solutions (before rotation and reflection). Any combination of rotating and reflecting one of these examples is also a valid solution.
- ```text
- ###Q####
- ######Q#
- ##Q#####
- #######Q
- #Q######
- ####Q###
- Q#######
- #####Q##
- ####Q###
- #Q######
- ###Q####
- ######Q#
- ##Q#####
- #######Q
- #####Q##
- Q#######
- ###Q####
- #Q######
- ######Q#
- ##Q#####
- #####Q##
- #######Q
- ####Q###
- Q#######
- ###Q####
- #####Q##
- #######Q
- ##Q#####
- Q#######
- ######Q#
- ####Q###
- #Q######
- ##Q#####
- #####Q##
- #######Q
- Q#######
- ###Q####
- ######Q#
- ####Q###
- #Q######
- ####Q###
- ##Q#####
- #######Q
- ###Q####
- ######Q#
- Q#######
- #####Q##
- #Q######
- ####Q###
- ######Q#
- ###Q####
- Q#######
- ##Q#####
- #######Q
- #####Q##
- #Q######
- ###Q####
- Q#######
- ####Q###
- #######Q
- #####Q##
- ##Q#####
- ######Q#
- #Q######
- ##Q#####
- #####Q##
- ###Q####
- Q#######
- #######Q
- ####Q###
- ######Q#
- #Q######
- #####Q##
- #Q######
- ######Q#
- Q#######
- ###Q####
- #######Q
- ####Q###
- ##Q#####
- ###Q####
- ######Q#
- Q#######
- #######Q
- ####Q###
- #Q######
- #####Q##
- ##Q#####
- #####Q##
- ###Q####
- ######Q#
- Q#######
- #######Q
- #Q######
- ####Q###
- ##Q#####
- ```
- The 12 fundamental solutions were taken from the [Wikipedia page for the 8 queens puzzle](https://en.wikipedia.org/wiki/Eight_queens_puzzle#Constructing_and_counting_solutions_when_n_=_8) which also provides them as images:
- [![The 12 fundamental solutions to the 8 queens puzzle](https://codegolf.codidact.com/uploads/WA6gMm476tdsgfbzPQHTPdUF)](https://en.wikipedia.org/wiki/Eight_queens_puzzle#Constructing_and_counting_solutions_when_n_=_8 "View the images on Wikipedia")
- ## Scoring
- Despite there being 92 valid outputs, this is a standard code golf challenge. Your score is the number of bytes in your code.
- > Explanations in answers are optional, but I'm more likely to upvote answers that have one.
#5: Post edited
- This is a fixed output challenge. Output a textual representation of a chessboard hosting 8 queens, none of which are attacking each other.
- There are 92 ways of arranging them, 12 if rotations and reflections are discounted. You may choose any of these arrangements.
- You are not required to calculate or search for a valid arrangement. Hardcoding your choice of arrangement is one possible valid solution.
- ## Input
- - There is no input for this challenge
- ## Output
- - 8 newline separated lines of 8 characters, with an optional trailing newline
- - Each character is either a queen or an empty square. You may choose any two distinct characters to represent a queen and an empty square
- - No more than 1 queen appears in each row, column, and diagonal
- - There are 8 queens in total
- - Your output must be the same each time (your code must have deterministic output, even if it uses a probabilistic approach internally)
- ## Scoring
- Despite there being 92 valid outputs, this is a standard code golf challenge. Your score is the number of bytes in your code.
- > Explanations in answers are optional, but I'm more likely to upvote answers that have one.
- This is a fixed output challenge. Output a textual representation of a chessboard hosting 8 queens, none of which are attacking each other.
- There are 92 ways of arranging them, 12 if rotations and reflections are discounted. You may choose any of these arrangements.
- You are not required to calculate or search for a valid arrangement. Hardcoding your choice of arrangement is one possible valid solution.
- ## Input
- - There is no input for this challenge
- ## Output
- - 8 newline separated lines of 8 characters, with an optional trailing newline
- - Each character is either a queen or an empty square. You may choose any two distinct characters to represent a queen and an empty square
- - No more than 1 queen appears in each row, column, and diagonal
- - There are 8 queens in total
- - Your output must be the same each time (your code must have deterministic output, even if it uses a probabilistic approach internally)
- ## Examples
- The examples show a queen as `Q` and an empty square as `#`. There are 12 examples, one for each of the fundamental solutions (before rotation and reflection). Any combination of rotating and reflecting one of these examples is also a valid solution.
- ```text
- ###Q####
- ######Q#
- ##Q#####
- #######Q
- #Q######
- ####Q###
- Q#######
- #####Q##
- ####Q###
- #Q######
- ###Q####
- ######Q#
- ##Q#####
- #######Q
- #####Q##
- Q#######
- ###Q####
- #Q######
- ######Q#
- ##Q#####
- #####Q##
- #######Q
- ####Q###
- Q#######
- ###Q####
- #####Q##
- #######Q
- ##Q#####
- Q#######
- ######Q#
- ####Q###
- #Q######
- ##Q#####
- #####Q##
- #######Q
- Q#######
- ###Q####
- ######Q#
- ####Q###
- #Q######
- ####Q###
- ##Q#####
- #######Q
- ###Q####
- ######Q#
- Q#######
- #####Q##
- #Q######
- ####Q###
- ######Q#
- ###Q####
- Q#######
- ##Q#####
- #######Q
- #####Q##
- #Q######
- ###Q####
- Q#######
- ####Q###
- #######Q
- #####Q##
- ##Q#####
- ######Q#
- #Q######
- ##Q#####
- #####Q##
- ###Q####
- Q#######
- #######Q
- ####Q###
- ######Q#
- #Q######
- #####Q##
- #Q######
- ######Q#
- Q#######
- ###Q####
- #######Q
- ####Q###
- ##Q#####
- ###Q####
- ######Q#
- Q#######
- #######Q
- ####Q###
- #Q######
- #####Q##
- ##Q#####
- #####Q##
- ###Q####
- ######Q#
- Q#######
- #######Q
- #Q######
- ####Q###
- ##Q#####
- ```
- The 12 fundamental solutions were taken from the [Wikipedia page for the 8 queens puzzle](https://en.wikipedia.org/wiki/Eight_queens_puzzle#Constructing_and_counting_solutions_when_n_=_8) which also provides them as images:
- [![The 12 fundamental solutions to the 8 queens puzzle](https://codegolf.codidact.com/uploads/WA6gMm476tdsgfbzPQHTPdUF)](https://en.wikipedia.org/wiki/Eight_queens_puzzle#Constructing_and_counting_solutions_when_n_=_8 "View the images on Wikipedia")
- ## Scoring
- Despite there being 92 valid outputs, this is a standard code golf challenge. Your score is the number of bytes in your code.
- > Explanations in answers are optional, but I'm more likely to upvote answers that have one.
#3: Post edited
- This is a fixed output challenge. Output a textual representation of a chessboard hosting 8 queens, none of which are attacking each other.
- There are 92 ways of arranging them, 12 if rotations and reflections are discounted. You may choose any of these arrangements.
- ## Input
- - There is no input for this challenge
- ## Output
- - 8 newline separated lines of 8 characters, with an optional trailing newline
- Each character is either a queen or an empty space. You may choose any two distinct characters to represent a queen and an empty space- - No more than 1 queen appears in each row, column, and diagonal
- - There are 8 queens in total
- - Your output must be the same each time (your code must have deterministic output, even if it uses a probabilistic approach internally)
- ## Scoring
- Despite there being 92 valid outputs, this is a standard code golf challenge. Your score is the number of bytes in your code.
- > Explanations in answers are optional, but I'm more likely to upvote answers that have one.
- This is a fixed output challenge. Output a textual representation of a chessboard hosting 8 queens, none of which are attacking each other.
- There are 92 ways of arranging them, 12 if rotations and reflections are discounted. You may choose any of these arrangements.
- You are not required to calculate or search for a valid arrangement. Hardcoding your choice of arrangement is one possible valid solution.
- ## Input
- - There is no input for this challenge
- ## Output
- - 8 newline separated lines of 8 characters, with an optional trailing newline
- - Each character is either a queen or an empty square. You may choose any two distinct characters to represent a queen and an empty square
- - No more than 1 queen appears in each row, column, and diagonal
- - There are 8 queens in total
- - Your output must be the same each time (your code must have deterministic output, even if it uses a probabilistic approach internally)
- ## Scoring
- Despite there being 92 valid outputs, this is a standard code golf challenge. Your score is the number of bytes in your code.
- > Explanations in answers are optional, but I'm more likely to upvote answers that have one.
#2: Post edited
- This is a fixed output challenge. Output a textual representation of a chessboard hosting 8 queens, none of which are attacking each other.
- There are 92 ways of arranging them, 12 if rotations and reflections are discounted. You may choose any of these arrangements.
- ## Input
- - There is no input for this challenge
- ## Output
- - 8 newline separated lines of 8 characters, with an optional trailing newline
- - Each character is either a queen or an empty space. You may choose any two distinct characters to represent a queen and an empty space
- - No more than 1 queen appears in each row, column, and diagonal
- - Your output must be the same each time (your code must have deterministic output, even if it uses a probabilistic approach internally)
- ## Scoring
- Despite there being 92 valid outputs, this is a standard code golf challenge. Your score is the number of bytes in your code.
- > Explanations in answers are optional, but I'm more likely to upvote answers that have one.
- This is a fixed output challenge. Output a textual representation of a chessboard hosting 8 queens, none of which are attacking each other.
- There are 92 ways of arranging them, 12 if rotations and reflections are discounted. You may choose any of these arrangements.
- ## Input
- - There is no input for this challenge
- ## Output
- - 8 newline separated lines of 8 characters, with an optional trailing newline
- - Each character is either a queen or an empty space. You may choose any two distinct characters to represent a queen and an empty space
- - No more than 1 queen appears in each row, column, and diagonal
- - There are 8 queens in total
- - Your output must be the same each time (your code must have deterministic output, even if it uses a probabilistic approach internally)
- ## Scoring
- Despite there being 92 valid outputs, this is a standard code golf challenge. Your score is the number of bytes in your code.
- > Explanations in answers are optional, but I'm more likely to upvote answers that have one.
#1: Initial revision
8 coexisting queens
This is a fixed output challenge. Output a textual representation of a chessboard hosting 8 queens, none of which are attacking each other. There are 92 ways of arranging them, 12 if rotations and reflections are discounted. You may choose any of these arrangements. ## Input - There is no input for this challenge ## Output - 8 newline separated lines of 8 characters, with an optional trailing newline - Each character is either a queen or an empty space. You may choose any two distinct characters to represent a queen and an empty space - No more than 1 queen appears in each row, column, and diagonal - Your output must be the same each time (your code must have deterministic output, even if it uses a probabilistic approach internally) ## Scoring Despite there being 92 valid outputs, this is a standard code golf challenge. Your score is the number of bytes in your code. > Explanations in answers are optional, but I'm more likely to upvote answers that have one.