Page 1 of 2

Pi Hates Nines Problem?

Posted: Fri Jun 06, 2008 8:34 pm
by therethinker
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. :D

Posted: Fri Jun 06, 2008 9:57 pm
by adum
your length is approximately right eyeballing it, but it doesn't start with a 4 and end with a 7. five people have gotten this one so far, so i'm pretty sure the answer is correct.

good luck, and glad you like the challenges =)

adum

Posted: Sun Jun 08, 2008 2:40 am
by therethinker
I finally got it, I think my data was off. I ended up using a program to generate it, it worked out a lot better ;-)

Data

Posted: Fri Jun 20, 2008 1:27 am
by Xeyes
Same problem here I get answer in 100's range but it's not correct where did you get your data from in the end I mean what did you use to generate it?

Posted: Wed Feb 04, 2009 5:03 am
by PrincessQTPi
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.

Posted: Wed Feb 04, 2009 12:56 pm
by Karian
I think there is something wrong with your source. For you to find out what it is.

Posted: Tue Dec 21, 2010 6:26 pm
by Hawkeye
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.

Posted: Wed Dec 22, 2010 2:37 am
by malachi
Save yourself heartache - google "million digits of pi" and download it. The correct string is more than 115 digits long.

Posted: Sun Jan 30, 2011 1:51 pm
by Guderian
i even found a txt file with the first 1 billion digits of pi! i used it in another challenge. it's a 980MB file :P

Posted: Mon Jun 20, 2011 9:29 pm
by cgsrki
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.

Posted: Tue Jun 21, 2011 6:27 am
by bodjo
in piday the number is too shorter then milion digit I was stuck there for a while
so find yourself another source

Posted: Tue Jun 21, 2011 8:40 am
by AMindForeverVoyaging
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 :)

Posted: Wed Sep 14, 2011 11:23 pm
by fragman
and why the hell should that be a problem? maybe I'm weird, but I solved this only with awk and sort, no problem so far

Posted: Wed Dec 28, 2011 7:40 am
by rain1024
got it, length of string is between 120 and 130

Perl approach

Posted: Tue Sep 10, 2013 1:04 am
by Sairera
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";