Carregando o exercício…
Fibonacci numbers follow a simple rule: each new number is the sum of the two before it. Given n, return the n-th Fibonacci number, where fib(0) = 0, fib(1) = 1, and fib(n) = fib(n-1) + fib(n-2). Try not to recompute the same values again and again.
[10]55[30]832040[0]0def fib(n: int) -> int:
Entre para ver seu histórico de envios
EntrarEntre para usar o AI Mentor
Entrar1055308320400011206765311346269