CT020

Fibonacci Fireflies

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Each firefly's brightness is the sum of the previous two, starting at 0 and 1. Task: Print Fibonacci number Fn for F0=0 and F1=1. Input format: One integer n. Output format: Print Fn. Constraints: 0 <= n <= 92

Example 1:

Input: 0
Output: 0

Example 2:

Input: 1
Output: 1

Example 3:

Input: 10
Output: 55

Constraints:

0 <= n <= 92

Tags:

dynamic-programming sequences
Loading...
Test Cases:No test cases
No test cases available.