Pi Hates Nines Problem?

therethinker
Posts: 144
Joined: Fri Mar 28, 2008 11:29 pm
Location: #hacker.org on Freenode

Pi Hates Nines Problem?

Post 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
User avatar
adum
Posts: 392
Joined: Thu Apr 19, 2007 12:49 pm
Contact:

Post 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
therethinker
Posts: 144
Joined: Fri Mar 28, 2008 11:29 pm
Location: #hacker.org on Freenode

Post 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 ;-)
Xeyes
Posts: 20
Joined: Mon Jun 16, 2008 8:59 pm

Data

Post 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?
PrincessQTPi
Posts: 5
Joined: Tue Feb 03, 2009 4:25 am
Location: The Wired

Post 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.
Meow! =^.^=
Karian
Posts: 75
Joined: Wed Jan 09, 2008 10:21 am

Post by Karian »

I think there is something wrong with your source. For you to find out what it is.
Hawkeye
Posts: 2
Joined: Sat Nov 08, 2008 7:52 am

Post 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.
User avatar
malachi
Posts: 45
Joined: Sun Dec 05, 2010 9:27 am
Location: 127.0.0.1
Contact:

Post by malachi »

Save yourself heartache - google "million digits of pi" and download it. The correct string is more than 115 digits long.
If you would be unloved and forgotten, be reasonable.
Guderian
Posts: 18
Joined: Tue Jan 25, 2011 4:31 pm
Location: Greece

Post 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
cgsrki
Posts: 1
Joined: Fri May 08, 2009 9:28 am
Location: Serbia

Post 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.
User avatar
bodjo
Posts: 37
Joined: Sat Feb 26, 2011 9:27 am
Location: tunisia

Post by bodjo »

in piday the number is too shorter then milion digit I was stuck there for a while
so find yourself another source
AMindForeverVoyaging
Forum Admin
Posts: 496
Joined: Sat May 28, 2011 9:14 am
Location: Germany

Post 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 :)
fragman
Posts: 15
Joined: Thu Mar 05, 2009 2:28 pm

Post 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
rain1024
Posts: 27
Joined: Sat Jul 23, 2011 5:20 pm

Post by rain1024 »

got it, length of string is between 120 and 130
Sairera
Posts: 6
Joined: Sun Nov 07, 2010 8:45 pm

Perl approach

Post 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";
I don't suffer from insanity. I enjoy every second of it.
Post Reply