• + 0 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