#P10095. [ROIR 2023] 斐波那契乘积 (Day 1)
[ROIR 2023] 斐波那契乘积 (Day 1)
Background
Translated from ROIR 2023 D1T2。
A Fibonacci number refers to a number appearing in the Fibonacci sequence ()。
Problem Description
Given a natural number , find the number of ways to represent it as a product of several Fibonacci numbers greater than 。
Input Format
The first line contains an integer , representing the number of test cases。
The next lines each contain one integer 。
Output Format
For each test case, output one integer representing the answer。
5
2
7
8
40
64
1
0
2
2
3
Hint
Explanation of the samples:
- 。
- cannot be represented as a Fibonacci product。
- 。
- 。
- $64=8\times8=2\times2\times2\times8=2\times2\times2\times2\times2\times2$。
This problem uses bundled testdata。
| Subtask ID | Score | |
|---|---|---|
| is an integer power of | ||
For all testdata, ,。
Translated by ChatGPT 5