#P3986. 斐波那契数列
斐波那契数列
Description
Define a sequence:
where are positive integers and .
How many pairs are there such that appears in this sequence and is not one of the first two terms?
Since the answer may be large, you only need to output the result modulo .
Input Format
One line containing an integer .
Output Format
One line containing an integer, which is the answer modulo .
19260817
34166325
1000000000
773877569
Hint
.
Translated by ChatGPT 5
京公网安备 11011102002149号