| IX MaratonUSP Freshman Contest |
|---|
| Finished |
The planet Venus is known for its toxic atmosphere and infernal temperatures, where apparently any civilization would be unable to live and thrive. However, records of an ancient civilization (the "Venirics") that inhabited Venus millions of years ago have been recently detected on this planet.
Faced with this surprising discovery, the Union of Solar Planets (USP) decided to send to this planet the only specialist capable of retrieving these records and revealing more details about the history of the Venutian civilization: the space archaeologist Otávio.
In his extensive research, Otávio discovered surprising facts about the generations of Venirics:
The only intact record that Otávio found about the size of the historical Venirics population was its total number (i.e., the sum of the sizes of all populations from generation $$$0$$$ to generation $$$m$$$), but he was unable to deduce anything about the values of $$$a$$$, $$$r$$$, and $$$m$$$, and therefore asked for help from Marcelo, the space computer scientist.
Marcelo was also unable to deduce the values of $$$a$$$, $$$r$$$, and $$$m$$$ from $$$n$$$, as he wisely noticed that different values of these parameters could have led to the same value of $$$n$$$. The only thing he knows is that there are not many possibilities for the sizes of the generations given $$$n$$$, and he wishes to determine how many there are.
Since returning from the toxicity of Venus, however, he can no longer type, and so he asked you to write a program that answers the question for him.
A single integer $$$n$$$ ($$$1 \leq n \leq 10^9$$$), the total historical population of the Venirics.
A single positive integer $$$t$$$, the number of possibilities for the sizes of the Veniric generations that would have made the total historical population of Venirics equal to $$$n$$$.
7
3
1000000000
101
For $$$n=7$$$, the $$$3$$$ possibilities for the sizes of the generations are:
| Name |
|---|


