Using Mathematica/Wolfram Alpha always looks like kind of cheating to me :plaz0r wrote:Actually,
StringTake[ToString@Fibonacci[1500000], {1, -1, 20000}]
is more concise
Search found 4 matches
- Sat Oct 08, 2011 12:20 am
- Forum: Challenges Solved
- Topic: Big Fib
- Replies: 15
- Views: 1873
- Thu Oct 06, 2011 4:35 pm
- Forum: Challenges Solved
- Topic: Big Fib
- Replies: 15
- Views: 1873
I like Ruby.
Took approx. 199.827814006 s with Ruby. 8) def fibn(m) if m==0 out=0 else n=1 fibn=1 fibnMinus1=0 while n<m do n=n+1 h=fibn+fibnMinus1 fibnMinus1=fibn fibn=h end out=fibn end return out end def efind x k=fibn(x).to_s s="" for i in 0..k.length-1 if i%20000==0 then s+=k[i].to_s end end retur...
- Tue Aug 02, 2011 8:56 pm
- Forum: Challenges
- Topic: Cavern Master
- Replies: 45
- Views: 92023
- Mon Aug 01, 2011 2:20 pm
- Forum: Challenges
- Topic: Growing Bacteria
- Replies: 39
- Views: 53853