WEBSITE RETURNED, HOWEVER SUBMIT QUANTITY IS RESTRICTED PER DAY TO VERY LITTLE (UNDER JUDGE0 NEW POLICY, API PROVIDER). Therefore it is very much for you to pay attention TEST CAREFULLY CODE BEFORE SUBMIT.

Nth Fibonacci number

Threads: Write a program that counts the n th Fibonacci sequence known sequence f(n) = f(n-1) + f(n-2), n > 2 and f(1) = 1, f(2) = 1.
Input: A positive integer n single (0 < n <= 50).
Output: A single integer f(n).
For example:

input:
3
output:
2

You are not logged in? Log in to Submit Now!

37 Comments

Add a Comment