Created
July 26, 2015 17:28
-
-
Save mad4j/9709d860f04a42153e95 to your computer and use it in GitHub Desktop.
Java Sudoku Solver (codegolf edition)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class S{public static void main(String...a){int i=a[0].indexOf(48),j;char | |
k=48,c[]=a[0].toCharArray();if(i<0)System.out.print(c);else | |
for(;++k<58;){for(j=81;j-->0&&((j-i)%9*(j/9^i/9)*(j/27^i/27|j%9/3^i%9/3) | |
|c[j]^k)!=0;);c[i]=k;if(j<0)main("".valueOf(c));}}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment