把題目寫出來讓以後的網友也能google到這篇
有一遊戲規則如右:在右圖中每一直行、每一橫列即每個小四方格裡,只有1到4的數字,每個數字在每個行列及每個小四方格裡都只出現一次,滿足這些條件的填法稱為一種解法。考慮方格不可旋轉或翻轉,則共有幾種解法。
這是2x2的數獨,wiki答案是288
http://en.wikipedia.org/wiki/Mat ... rectangular_regions
解法可以參考看這篇
http://forum.enjoysudoku.com/sud ... are-t170.html#p2992
by geoff
A neat way of counting.
Consider grids of the type
AB | xx
Cx | xx
--------
xx | Dx
xx | x E
where A,B,C are different, D and E are different. There are 288 of these and each gives a unique solution. Therefore 288 solutions.
A、B、C三個數字要完全不同有4*3*2=24種
D、E兩個數字要完全不同有4*3=12種
A~E數字決定後剩下的空位是唯一決定的
共有24*12=288種