gs

Please in order to save solutions and appear on the leaderboards.

Details

Sudoku is a number puzzle where a grid of 81 digits (9×9) is filled by the digits 1-9 such that no row, column, or 3×3 subregion contains duplicate digits.

Write a program that given an incomplete Sudoku board as 9 arguments of 9 digits, with blanks represented by an underscore, prints a solved Sudoku grid using Unicode box-drawing characters like so:

┏━━━┯━━━┯━━━┳━━━┯━━━┯━━━┳━━━┯━━━┯━━━┓
┃ 2 │ 5 │ 8 ┃ 4 │ 1 │ 7 ┃ 6 │ 9 │ 3 ┃
┠───┼───┼───╂───┼───┼───╂───┼───┼───┨
┃ 6 │ 1 │ 7 ┃ 9 │ 2 │ 3 ┃ 8 │ 5 │ 4 ┃
┠───┼───┼───╂───┼───┼───╂───┼───┼───┨
┃ 9 │ 3 │ 4 ┃ 8 │ 6 │ 5 ┃ 1 │ 7 │ 2 ┃
┣━━━┿━━━┿━━━╋━━━┿━━━┿━━━╋━━━┿━━━┿━━━┫
┃ 3 │ 2 │ 5 ┃ 7 │ 8 │ 1 ┃ 4 │ 6 │ 9 ┃
┠───┼───┼───╂───┼───┼───╂───┼───┼───┨
┃ 8 │ 9 │ 6 ┃ 3 │ 5 │ 4 ┃ 2 │ 1 │ 7 ┃
┠───┼───┼───╂───┼───┼───╂───┼───┼───┨
┃ 7 │ 4 │ 1 ┃ 6 │ 9 │ 2 ┃ 5 │ 3 │ 8 ┃
┣━━━┿━━━┿━━━╋━━━┿━━━┿━━━╋━━━┿━━━┿━━━┫
┃ 4 │ 6 │ 9 ┃ 1 │ 3 │ 8 ┃ 7 │ 2 │ 5 ┃
┠───┼───┼───╂───┼───┼───╂───┼───┼───┨
┃ 5 │ 7 │ 3 ┃ 2 │ 4 │ 6 ┃ 9 │ 8 │ 1 ┃
┠───┼───┼───╂───┼───┼───╂───┼───┼───┨
┃ 1 │ 8 │ 2 ┃ 5 │ 7 │ 9 ┃ 3 │ 4 │ 6 ┃
┗━━━┷━━━┷━━━┻━━━┷━━━┷━━━┻━━━┷━━━┷━━━┛

Variants: Sudoku v2

External links: Rosetta Code, Wikipedia

0 bytes, 0 chars
Restore solution
All
Compiled from AT&T syntax to x86-64 Linux. Use syscalls to write output.
Arturo is an experimental language, no solutions will be saved. Please leave feedback on the GitHub issue.
Befunge is an experimental language, no solutions will be saved. Please leave feedback on the GitHub issue.
BQN is an experimental language, no solutions will be saved. Please leave feedback on the GitHub issue.
CoffeeScript is an experimental language, no solutions will be saved. Please leave feedback on the GitHub issue.
Fennel is an experimental language, no solutions will be saved. Please leave feedback on the GitHub issue.
Gleam is an experimental language, no solutions will be saved. Please leave feedback on the GitHub issue.
Hare is an experimental language, no solutions will be saved. Please leave feedback on the GitHub issue.
Haxe is an experimental language, no solutions will be saved. Please leave feedback on the GitHub issue.
Hush is an experimental language, no solutions will be saved. Please leave feedback on the GitHub issue.
Hy is an experimental language, no solutions will be saved. Please leave feedback on the GitHub issue.
Odin is an experimental language, no solutions will be saved. Please leave feedback on the GitHub issue.
Racket is an experimental language, no solutions will be saved. Please leave feedback on the GitHub issue.
Rebol is an experimental language, no solutions will be saved. Please leave feedback on the GitHub issue.
Rexx is an experimental language, no solutions will be saved. Please leave feedback on the GitHub issue.
Rockstar 2 is an experimental language, no solutions will be saved. Please leave feedback on the GitHub issue.
Uiua is an experimental language, no solutions will be saved. Please leave feedback on the GitHub issue.
ctrl + enter or

Delete Solution

Are you sure you want to delete your solution(s) for Sudoku?

If you have separate bytes and chars solutions then both will be deleted.

This is irreversible, please backup any code you care about.

Type I understand and press confirm to continue.