4 ms·
Did it in Io (was already doing Euler stuff), pretty similar: problem25 := method(digits, term := 0 n0 := BigNum with(0) n1 := BigN
by vito 17y ago
Did it in Io (was already doing Euler stuff), pretty similar:
problem25 := method(digits,
term := 0
n0 := BigNum with(0)
n1 := BigNum with(1)
loop(
n0 = n0 + n1
n1 = n0 - n1
if(n1 asString size >= digits, break)
term = term + 1
)
term
)
problem25(1000) println
- deleted 17y ago[deleted]
- huherto 17y agonice!