编程介的小学生 2019-08-26 19:42 采纳率: 20.5%
浏览 84

用C语言开发: Sibonacci Numbers

Problem 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 f(x)=1 (0 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<T<=10000) which means the number of test cases in the input file.
Then followed T different lines, each contains a number x(-1000<x<1000).

Output
For each case of the input file, just output the result, one for each line.

Sample Input
3
-1
0.667
3.15

Sample Output
0
1
2

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 解决一个加好友限制问题 或者有好的方案
    • ¥15 关于#java#的问题,请各位专家解答!
    • ¥15 急matlab编程仿真二阶震荡系统
    • ¥20 TEC-9的数据通路实验
    • ¥15 ue5 .3之前好好的现在只要是激活关卡就会崩溃
    • ¥50 MATLAB实现圆柱体容器内球形颗粒堆积
    • ¥15 python如何将动态的多个子列表,拼接后进行集合的交集
    • ¥20 vitis-ai量化基于pytorch框架下的yolov5模型
    • ¥15 如何实现H5在QQ平台上的二次分享卡片效果?
    • ¥30 求解达问题(有红包)