Hacker, author, trainer
Technorati Profile [technorati.com]
Here's the program I used to solve the first stage of Google's puzzle.
#!/usr/bin/perl
use Net::DNS;
my $res = Net::DNS::Resolver->new;
my $e = '27182818284590452353602874713526624977572470936999'
.'59574966967627724076630353547594571382178525166427'
.'42746639193200305992181741359662904357290033429526'
.'05956307381323286279434907632338298807531952510190'
.'11573834187930702154089149934884167509244761460668';
foreach (0.. length $e) {
my $n = substr $e, $_, 10;
my $q = $res->search("$n.com");
if ($q) {
print $n, "\n";
last;
}
}
brilliance (Score:2)
--
xoa
Re:brilliance (Score:2)
Early answer (Score:1)
Did you realise that the answer was likely to occur within the first 250 digits, or was it a bit of luck?
An early answer is not at all unlikely (Score:1)
Therefore the odds of finding one in the first 250 digits are pretty good. And if you don't find one there, you can just add digits.
Incidentally the geeky answer to this question is that the first 10 digit prime in the digits of e is 0000000002.