Pi Hates Nines Problem?
-
- Posts: 144
- Joined: Fri Mar 28, 2008 11:29 pm
- Location: #hacker.org on Freenode
Pi Hates Nines Problem?
I'm stuck on this one. I've set up a solver, and it gave me an answer that was (between 100 and 120) #'s long. It starts with 4 and ends with a 7. When I tried to answer, however, it said that it was incorrect.
I've run it several times over the first M digits of pi from a variety of sources, and I get the same answer. I've even re-written it in a few different languages.
By the way, I love the challenges. They're awesome.
I've run it several times over the first M digits of pi from a variety of sources, and I get the same answer. I've even re-written it in a few different languages.
By the way, I love the challenges. They're awesome.
-
- Posts: 144
- Joined: Fri Mar 28, 2008 11:29 pm
- Location: #hacker.org on Freenode
-
- Posts: 5
- Joined: Tue Feb 03, 2009 4:25 am
- Location: The Wired
i used http://www.cecm.sfu.ca/organics/papers/ ... igits.html found the longest by hand 6 times all 6 time i got the same thing yet it still says it wrong, so i made a program in python to do it by getting pi on its own and i got the same number, and it still didnt work.
Meow! =^.^=
is it possible that i will not be able to solve this challenge using a bbp formula of pi?
i used the code that came directly from one of them to create the digits of pi i need but the answer seems wrong. i got a space without nines around 115 other digits. which source of pi should be used? any special hints?
thanks a lot for an answer.
i used the code that came directly from one of them to create the digits of pi i need but the answer seems wrong. i got a space without nines around 115 other digits. which source of pi should be used? any special hints?
thanks a lot for an answer.
I know that I am kind of late, but I keep getting the result length like therethinker ,only difference is that my number is starting with 22 and ending with 86.
Also my "pi source" : http://www.piday.org/million.php (if it makes any difference)
I would really appreciate any help, my script is in python and I am kind of new in it so....
Thanks in advanced.
Also my "pi source" : http://www.piday.org/million.php (if it makes any difference)
I would really appreciate any help, my script is in python and I am kind of new in it so....
Thanks in advanced.
-
- Forum Admin
- Posts: 496
- Joined: Sat May 28, 2011 9:14 am
- Location: Germany
The source is perfectly fine for this challenge, I just checked it. Just use
http://www.piday.org//includes/pi_to_1m ... ts_v2.html
and save it to a file.
One thing you have to keep in mind: Not all the characters that you read from the file are actually numbers. Take care of that, and you will succeed
http://www.piday.org//includes/pi_to_1m ... ts_v2.html
and save it to a file.
One thing you have to keep in mind: Not all the characters that you read from the file are actually numbers. Take care of that, and you will succeed
Perl approach
This is the perl script I used to try to find the answer. I substituted the 9's for (", ") to separate the strings in the array. I keep getting the same wrong answer no matter what source I use. Any ideas?
$big = 0;
foreach (@array) {
if ($_ > $big) {
$big = $_;
}
}
print "$big\n";
$big = 0;
foreach (@array) {
if ($_ > $big) {
$big = $_;
}
}
print "$big\n";
I don't suffer from insanity. I enjoy every second of it.