当前位置: 首页 > 数据结构&&算法 > 正文

1003 – Sibonacci Numbers

1003 – Sibonacci Numbers

Time Limit: 1s Memory Limit: 64MB

Submissions: 2130 Solved: 360
Description
As is known to all, the definition of Fibonacci Numbers is: f(1)=1 f(2)=1 f(n)=f(n-1)+f(n-2) (n>=3) Now Sempr found another Numbers, he named it “Sibonacci Numbers”, the definition is below: f(x)=0 (x<0) f(x)=1 (0<=x<1) f(x)=f(x-1)+f(x-3.14) (x>=1) Your work is to tell me the result of f(x), is the answer is too large, divide it by 1000000007 and give me the remainder. Be careful the number x can be an integer or not.
Input
In the first line there is an Integer T(0
Output
For each case of the input file, just output the result, one for each line.
Sample Input
Sample Output

版权声明:本文为博主原创文章,未经博主允许不得转载。

]]>

本文固定链接: http://zmrlinux.com/2015/06/04/1003-sibonacci-numbers/ | Kernel & Me

该日志由 root 于2015年06月04日发表在 数据结构&&算法 分类下, 你可以发表评论,并在保留原文地址及作者的情况下引用到你的网站或博客。
原创文章转载请注明: 1003 – Sibonacci Numbers | Kernel & Me