Haskell — Fibonacci again

Write a function fib :: Int -> Integer that, given a natural n, returns
the n-th element of the Fibonacci sequence.

Scoring

- test-1:   Inputs with n ≤ 25.

- test-2:   Inputs with n ≤ 10000.

- test-3:   Inputs with n ≤ 50000000.

Problem information

Author: Unknown
Translator: Jordi Petit

Generation: 2026-02-03T17:02:45.660Z

© Jutge.org, 2006–2026.
https://jutge.org
