In article <20050819130127.ELYX12628.eastrmmtao02.cox.net / localhost.localdomain>, Ruby Quiz <james / grayproductions.net> wrote: > > Sodokus are simple number puzzles that often appear in various sources of > print. <snip> > This week's Ruby Quiz is to write a solver that takes the puzzle on STDIN and > prints the solution to STDOUT. Heh. I already wrote a Sudoku solver back in May; all I have to do is change the input/output format a bit to match the quiz example. In the meantime, here's a harder puzzle to test your programs with: +-------+-------+-------+ | _ _ 2 | _ _ 5 | _ 7 9 | | 1 _ 5 | _ _ 3 | _ _ _ | | _ _ _ | _ _ _ | 6 _ _ | +-------+-------+-------+ | _ 1 _ | 4 _ _ | 9 _ _ | | _ 9 _ | _ _ _ | _ 8 _ | | _ _ 4 | _ _ 9 | _ 1 _ | +-------+-------+-------+ | _ _ 9 | _ _ _ | _ _ _ | | _ _ _ | 1 _ _ | 3 _ 6 | | 6 8 _ | 3 _ _ | 4 _ _ | +-------+-------+-------+ -- Karl von Laudermann - karlvonl(a)rcn.com - http://www.geocities.com/~karlvonl #!/usr/bin/env ruby require "complex";w=39;m=2.0;w.times{|y|w.times{|x|c=Complex.new((m*x/w)-1.5, (2.0*y/w)-1.0);z=c;e=false;49.times{z=z*z+c;if z.abs>m then e=true;break;end} print(e ?" ":"@@");puts if x==w-1;}}