410442: GYM104021 N Fibonacci Sequence
Memory Limit:512 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
N. Fibonacci Sequencetime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard output
The Fibonacci sequence is a sequence of natural numbers, and is defined as follows:
- $$$F_1=1$$$;
- $$$F_2=1$$$; and
- $$$F_n=F_{n-1}+F_{n-2}$$$ for $$$n>2$$$.
Write a program to output the first $$$5$$$ numbers in the Fibonacci sequence.
InputThere is no input for this problem.
OutputOutput $$$5$$$ integers indicating the first $$$5$$$ numbers in the Fibonacci sequence. Any two adjacent numbers in the output are separated by exactly one space and there is no extra space or symbol at the end of the line.
ExampleInput(no input)Output
1 1 2 3 5