Problems
Contests
Account
Problems
> Lucas Numbers Modulo > Editorial
Lucas Numbers Modulo — Solution & Editorial
Back to the Problem
Exponentiate the 2×2 companion matrix of the recurrence.
Complexity:
O(log N)
×
Refer Job