402836: GYM100917 C Constant Ratio
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
C. Constant Ratiotime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output
Given an integer n, find out number of ways to represent it as the sum of two or more integers ai with the next property: ratio ai / ai - 1 is the same positive integer for all possible i > 1.
InputInput consists of one integer n (1 ≤ n ≤ 105).
OutputPrint one integer — number of representations.
ExamplesInput1Output
0Input
5Output
2Input
567Output
21Note
In the first sample no such representation exists.
In the second sample there exist two representations:
- 1 1 1 1 1, then q = 1.
- 1 4, then q = 4.