#!/usr/bin/perl # glat-1.pl # GLAT ANSWER TO #1 # Written by Trey Hunner # Licensed under the GPL # Do not use this to cheat $w=0; $d=0; $o=0; $t=0; $g=0; $l=0; $e=0; $c=0; while($w<10) { $d=0; until(($d != $w)) {if($d<10){$d++;}} while($d<10) { $o=0; until(($o != $d && $o != $w)) {if($o<10){$o++;}} while($o<10) { $t=0; until(($t != $o && $t != $d && $t != $w)) {if($t<10){$t++;}} while($t<10) { $g=0; until(($g != $t && $g != $o && $g != $d && $g != $w)) {if($g<10){$g++;}} while($g<10) { $l=0; until(($l != $g && $l != $t && $l != $o && $l != $d && $l != $w)) {if($l<10){$l++;}} while($l<10) { $e=0; until(($e != $l && $e != $g && $e != $t && $e != $o && $e != $d && $e != $w)) {if($e<10){$e++;}} while($e<10) { $c=0; until(($c != $e && $c != $l && $c != $g && $c != $t && $c != $o && $c != $d && $c != $w)) {if($c<9){$c++;}} while($c<10) { $wwwdot = $w*100000 + $w*10000 + $w*1000 + $d*100 + $o*10 + $t; $google = $g*100000 + $o*10000 + $o*1000 + $g*100 + $l*10 + $e; $dotcom = $d*100000 + $o*10000 + $t*1000 + $c*100 + $o*10 + $e; if($wwwdot - $google == $dotcom) {print "$wwwdot - $google == $dotcom\n";} $c++; until(($c != $e && $c != $l && $c != $g && $c != $t && $c != $o && $c != $d && $c != $w)) {if($c<10){$c++;if(!($c != $e && $c != $l && $c != $g && $c != $t && $c != $o && $c != $d && $c != $w)){break;}}} } $e++; until(($e != $l && $e != $g && $e != $t && $e != $o && $e != $d && $e != $w)) {if($e<10){$e++;}} } $l++; until(($l != $g && $l != $t && $l != $o && $l != $d && $l != $w)) {if($l<10){$l++;}} } $g++; until(($g != $t && $g != $o && $g != $d && $g != $w)) {if($g<10){$g++;}} } $t++; until(($t != $o && $t != $d && $t != $w)) {if($t<10){$t++;}} } $o++; until(($o != $d && $o != $w)) {if($o<10){$o++;}} } $d++; until(($d != $w)) {if($d<10){$d++;}} } $w++; }