Submit solution
Points:
100
Time limit:
1.0s
Python 3
5.0s
Memory limit:
256M
Python 3
977M
Author:
Problem type
Lindra has found the formula to eternal life! Unfortunately, they have also proved that no closed form exists, and therefore they are not too sure how to solve it. The formula is recursive, of the form . If they are able to find the value of , Lindra will surely be able to achieve immortality. As Indra's PHD supervisor, can you help them find this value?
Since this value can be quite large, output it modulo 1000000007.
Input Format
The input will consist of the three integers from the description on one line, , and .
Output Format
The output should consist of a single integer, the value of modulo .
Sample Input
1 2 4
Sample Output
16
Sample Explanation
This sample corresponds to the powers of two. F(0) = 1, F(1) = 2, F(2) = 4, F(3)=8, F(4)=16, etc
Constraints
Comments