Fibonacci Sum

TimeLimit:2000MS  MemoryLimit:524288KB
64-bit integer IO format:%I64d
未提交 | 登录后收藏
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.
SampleInput
2
5 1 1
2 1 2
SampleOutput
12
2
Submit
题目统计信息详细
总AC数1
通过人数1
尝试人数1
总提交量1
AC率100.00%
AC该题后可以添加标签
贴完标签可以获得20ACB。
并且可以获得本题所有提交代码查看权限。
点击标题可以显示标签。
如果你还没认真思考过这题,请不要查看标签
如果您已经通过了该题,请务为该题贴上标签

T^T Online Judge

[BUG反馈] [FAQ] [闽ICP备17026590号-1]
当前版本:3.24 系统时间: