|
||||||||||
Fibonacci SumTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 4821 Accepted Submission(s): 1139 Problem Description The Fibonacci numbers are defined as below: Given three integers N, C and K, calculate the following summation: Since the answer can be huge, output it modulo 1000000009 ($10^9$+9). Input The first line contains an integer T (1¡ÜT¡Ü200), denoting the number of test cases. Each test case contains three space separated integers in the order: N, C, K (1¡ÜN,C¡Ü$10^{18}$,1¡ÜK¡Ü$10^5$). Output For each test case, output a single line containing the answer. Sample Input
Sample Output
Source | ||||||||||
|