View Single Post
Old 05-28-2003, 07:16 PM  
kevinale
Confirmed User
 
Join Date: Dec 2002
Location: Austin, TX
Posts: 2,115
Quote:
Originally posted by bdjuf
for sure I give up,
I just want to know what kind of script would solve that question =)
I used PERL.. Here is the script I used. It doesn't have the answers.. I'll post them later..

<pre>

for($i=0; $i<999999; ++$i){
if(checkNum($i)){
print "ANSWER IS $i\n";
#exit(1);
}
}

sub checkNum{
$num = shift;
$num2 = "";
for($j=0; $j<=length($num); ++$j){
$num2 .= substr($num, length($num)-$j, 1);
}
if( ($num*4) hahahaha ($num2*1) ){
return 1;
}
return 0;
}
</pre>

This will print the 4 answers

PS: That "hahaha" is the "= =" without the space
__________________
1monkey0cup.com
kevinale is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote