go编程解数独

gs272 · · 5066 次点击
`我用C语言写的解得挺快的(go正在学习中)。我接的结果是这样,需要的话我可以把代码贴出来:` RESULT SUDOKU `*****************************************************` `+-----------------+-----------------+-----------------+` `| --- --- --- | --- --- --- | --- --- --- |` `| | 5 | 8 | 7 | | | 9 | 2 | 6 | | | 4 | 3 | 1 | |` `| --- --- --- | --- --- --- | --- --- --- |` `| | 9 | 1 | 4 | | | 3 | 5 | 7 | | | 6 | 2 | 8 | |` `| --- --- --- | --- --- --- | --- --- --- |` `| | 6 | 3 | 2 | | | 8 | 1 | 4 | | | 5 | 9 | 7 | |` `| --- --- --- | --- --- --- | --- --- --- |` `+-----------------+-----------------+-----------------+` `| --- --- --- | --- --- --- | --- --- --- |` `| | 3 | 2 | 6 | | | 7 | 8 | 1 | | | 9 | 4 | 5 | |` `| --- --- --- | --- --- --- | --- --- --- |` `| | 4 | 7 | 8 | | | 5 | 9 | 3 | | | 1 | 6 | 2 | |` `| --- --- --- | --- --- --- | --- --- --- |` `| | 1 | 9 | 5 | | | 4 | 6 | 2 | | | 8 | 7 | 3 | |` `| --- --- --- | --- --- --- | --- --- --- |` `+-----------------+-----------------+-----------------+` `| --- --- --- | --- --- --- | --- --- --- |` `| | 8 | 6 | 9 | | | 2 | 7 | 5 | | | 3 | 1 | 4 | |` `| --- --- --- | --- --- --- | --- --- --- |` `| | 2 | 5 | 3 | | | 1 | 4 | 9 | | | 7 | 8 | 6 | |` `| --- --- --- | --- --- --- | --- --- --- |` `| | 7 | 4 | 1 | | | 6 | 3 | 8 | | | 2 | 5 | 9 | |` `| --- --- --- | --- --- --- | --- --- --- |` `+-----------------+-----------------+-----------------+` ***************************************************** GAME OVER `(本来在输出的格式还挺整齐的,粘到这里好像变形了)`
#8
更多评论
polaris
社区,需要你我一同完善!
没玩过数独……
#1
不好意思,写错了,应该是下面的 007000001 900000628 602000590 000081005 070503000 090060070 000005000 200040086 040030000
#2