#P1748. Find the nth H-Number
Find the nth H-Number
Find the nth H-Number
An H-Number is defined as a positive integer that has no prime factors other than \(2,\,3,\,5,\,7\). For example, \(630\) is an H-Number while \(22\) is not.
By convention, we assign \(H[1] = 1\). Given an integer \(n\) (\(1 \le n \le 10000\)), output the \(n\)th H-Number. It is guaranteed that the resulting number will fit in 64-bit signed integer.
inputFormat
The input consists of a single integer \(n\), representing the position in the series.
outputFormat
Output the \(n\)th H-Number.
sample
1
1