luogu#P2626. 斐波那契数列(升级版)

斐波那契数列(升级版)

Background

Everyone knows that the Fibonacci sequence satisfies the following properties:

  • f(1)=1f(1) = 1.
  • f(2)=1f(2) = 1.
  • f(n)=f(n1)+f(n2)f(n) = f(n-1) + f(n-2) (where n>2n > 2 and nn is an integer).

Problem Description

Please compute the nn-th Fibonacci number, take it mod231\bmod\,2^{31}, and factor the result into prime factors.

Input Format

Input a positive integer nn.

Output Format

Output the prime factorization of the nn-th Fibonacci number after applying mod231\bmod\,2^{31}.

5
5=5
6
8=2*2*2

Hint

n48n \le 48.

Translated by ChatGPT 5