#t441. H数
H数
H-numbers
Problem Background
Special for beginners, ^_^
Problem Description
An H-number is a number whose prime factors contain only , such as which is an H-number, while is not. Now output the -th H-number. For convenience, define . It is known that , and the final data is within the range of int64.
Input Format
One number (as described).
Output Format
The -th H-number.
Sample Input 1
30
Sample Output 1
49
Sample Input 2
1
Sample Output 2
1
Hint
Brute force enumeration will overflow; use a generation method, preferably with optimization, otherwise the space complexity will be large.
Constraints
Time limit 1s, memory limit 1024KiB for each test case.