Beautiful sums
Time limit1sMemory limit1024 MB
Given n, find the smallest integer with exactly n odd divisors (equivalently n beautiful sum representations), printed modulo 1000000009.
- Level
Medium6 of 10
- Topics
- Number theory, Math, Backtracking
- Solved
- No attempts yet
Problem
Beautiful sums are sums of several consecutive positive integers. For example, the sums and are beautiful, but is not, even though all three equal . (A sum with a single summand, such as alone, is also considered beautiful.)
The beauty index of an integer is the number of ways it can be written as a beautiful sum. For example, 15 has beauty index 4 because , and 15 is the smallest integer with beauty index 4.
An integer with a higher beauty index is more beautiful. If two integers have the same beauty index, the smaller one is more beautiful. For a given beauty index , find the smallest integer with that beauty index.
Input
A single line contains an integer ().
Output
Output the smallest integer with beauty index modulo .