#P4359. [CQOI2016] 伪光滑数
[CQOI2016] 伪光滑数
Description
If a positive integer has terms in its prime factorization, its largest prime factor is , and it satisfies , , then is called an -pseudo-smooth number.
Given , among all integers, find the -th largest -pseudo-smooth number.
Clarification: Let . Then the corresponding . That is, by the Fundamental Theorem of Arithmetic, write and . “-th largest” is literal: the -th from largest to smallest.
Modified by expect2004 on 2020-11-25; this may be his last contribution to the Luogu public problem set before retirement.
Input Format
One line with two space-separated integers and .
Output Format
One line containing a single integer, the answer.
12345 20
9167
Hint
For of the testdata, .
For of the testdata, . It is guaranteed that there are at least numbers that satisfy the requirements.
Translated by ChatGPT 5
京公网安备 11011102002149号