发布日期:2020-08-17 17:46:28

数独是一种风靡全球的智力游戏,也称为Sudoku,Number Place。正规的数独题目需要保证每个题目仅有一个解。

 

数独规则

标准数独由9行,9列共81的小格子构成。

分别在格子中填入1到9的数字,并满足下面的条件。

  • 每一行都用到1,2,3,4,5,6,7,8,9
  • 每一列都用到1,2,3,4,5,6,7,8,9
  • 每3×3的格子都用到1,2,3,4,5,6,7,8,9

 

Sudo1:

http://www.sudoku-cn.com

 

sudoArr(level1):

216004503,970008001,500030000,000240100,005976034,309805702,408300019,602009478,701082056

002009040,700000985,600003021,900001007,005897600,020465190,050600009,876004013,090300500

350062000,020500603,001300720,208070000,900805000,000040816,000003260,409000001,060158000

003000000,600500004,004370018,100092670,020800009,400100020,060050001,048009207,001084030

000300620,800092100,509700003,090073080,005000016,040060007,400007090,300001200,006205704

750000490,080051300,030074000,007403008,006000170,802160000,100300006,408006009,060500040

200401030,403000190,010807000,002083000,000060925,740100008,800370000,061000703,009010050

600050802,005200037,240630000,700006020,080900050,029007300,000003904,000029500,934000060

200071003,009080010,050900208,000400852,005092000,400300070,040507600,000003925,508000040

400030006,000600071,062009000,850204000,000960180,039000702,007001063,180050090,000806500

 

level2:

061030000,009000083,800260100,006000072,400106000,090007800,000795060,602040500,950000008

003008002,200070100,010960007,020050340,001000025,058704000,960800000,100030009,000006810

020940003,070200000,009000428,000070800,348000500,000802040,000005680,600490007,257060000

 

level3:

600007030,079030040,800000001,000700003,062400000,000160720,306050000,000018305,050000800

806050010,040000503,090070008,000590600,002006040,600007800,000000407,008000051,005029000

960240500,007010020,200600100,000000705,010309000,008020000,020030010,000007002,106002080

 

level4:

100050020,070004600,030000050,300000006,740300000,000510009,000260401,007000000,086000900

004080000,800004000,307900000,000002108,471000002,050400700,600820000,000003010,000007069

020000003,104000000,000520400,030800901,000009020,270000000,006050042,700000100,008096000

 

 

 

var question1 = [[2, 1, 6, 0, 0, 4, 5, 0, 3],

    [9, 7, 0, 0, 0, 8, 0, 0, 1],

    [5, 0, 0, 0, 3, 0, 0, 0, 0],

    [0, 0, 0, 2, 4, 0, 1, 0, 0],

    [0, 0, 5, 9, 7, 6, 0, 3, 4],

    [3, 0, 9, 8, 0, 5, 7, 0, 2],

    [4, 0, 8, 3, 0, 0, 0, 1, 9],

    [6, 0, 2, 0, 0, 9, 4, 7, 8],

    [7, 0, 1, 0, 8, 2, 0, 5, 6]

    ];

 

    var question2 = [[0,0,2,0,0,9,0,4,0],

    [7,0,0,0,0,0,9,8,5],

    [6,0,0,0,0,3,0,2,1],

    [9,0,0,0,0,1,0,0,7],

    [0,0,5,8,9,7,6,0,0],

    [0,2,0,4,6,5,1,9,0],

    [0,5,0,6,0,0,0,0,9],

    [8,7,6,0,0,4,0,1,3],

    [0,9,0,3,0,0,5,0,0]

    ];

发表评论