Comments on Create a Sudoku
Parent
Create a Sudoku
Write the shortest program that takes no input and outputs a Sudoku solution.
For reference, a Sudoku solution is a 9x9 grid of digits where each column, each row and each of the nine 3x3 grids that compose the board have all of the digits from 1 to 9.
Your output may look like this:
123456789
456789123
789123456
231564897
564897231
897231564
312645978
645978312
978312645
Or it may look like this:
123456789456789123789123456231564897564897231564897231897231564312645978645978312978312645
It may be an array of 9 digit integers, 3 digit integers, a 9x9 matrix or nine 3x3 matrices as well.
You may use the digits 012345678, not 123456789, so long as adding 1 to each digit in the output gives a valid Sudoku solution.
There used to be a script to check solutions but it doesn't work. If you code one be sure to tell me.
Your program can have multiple outputs but you'll need to prove that they are all valid solutions.
Have fun, codidactyls!
[Haskell], 50 bytes …
3y ago
BQN, 11 9 bytesSBCS Run onl …
3y ago
[APL (Dyalog Unicode)], 22 byt …
3y ago
Japt, 10 bytes Outputs a 2D …
3y ago
2 comment threads