F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Sibonacci Numbers

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others)
Total Submission(s): 1058    Accepted Submission(s): 368


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<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<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
 

Author
Sempr|CrazyBird|hust07p43
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-05-12 11:32:39, Gzip enabled