题目链接:https://acs.jxnu.edu.cn/problem/HDU1250
描述:
A Fibonacci sequence is calculated by adding the previous two members the sequence, with the first two members being both 1.
F(1) = 1, F(2) = 1, F(3) = 1,F(4) = 1, F(n>4) = F(n - 1) + F(n-2) + F(n-3) + F(n-4)
Your task is to take a number as input, and print that Fibonacci number.
输入:
Each line will contain an integers. Process to end of file.
输出:
For each case, output the result in a line.
翻译:一个斐波纳契数列通过增加数列先前的两个元素计算,起始的两个元素都是1。F(1) = 1, F(2) = 1, F(3) = 1,F(4) = 1, F(n>4) = F(n - 1) + F(n-2) + F(n-3) + F(n-4)你的任务是输入一个数,然后打印斐波纳契数列的数字。
输入:
每行包括一个整数,文件结尾流程结束。
输出:
每个示例,在一行输出结果。