You are viewing a single comment's thread. Return to all comments →
had to write it in a REPL
import Control.Monad nthFib i = let fib = 0 : 1 : zipWith (+) fib (tail fib) in (fib !! i) main = getLine >>= (`replicateM_` (getLine >>= print . (`mod` 100000007) . nthFib . read)) . read
Seems like cookies are disabled on this browser, please enable them to open this website
Fibonacci
You are viewing a single comment's thread. Return to all comments →
had to write it in a REPL