![]() |
||||||||||
|
||||||||||
Fibonacci SumTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 4822 Accepted Submission(s): 1140 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 | ||||||||||
|