Fibonacci Numbers
Hard
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
The Fibonacci sequence is the sequence of numbers such that every element is equal to the sum of the two previous elements, except for the first two elements F_0 and F_1 which are respectively zero and one.
What is the numerical value of the nth Fibonacci number?
For each test case, a line will contain an integer i between 0 and 10^8 inclusively, for which you must compute the ith Fibonacci number F_i. Fibonacci numbers get large pretty quickly, so whenever the answer has more than 8 digits, output only the first and last 4 digits of the answer, separating the two parts with an ellipsis ("...").
There is no special way to denote the end of the of the input, simply stop when the standard input terminates (after the EOF).
Examples
Input #1
Answer #1
Submissions 793
Acceptance rate 7%