Divisor Count
In this problem, you have to find the first n integers that have exactly k divisors.
A divisor of an integer a is an integer b such that the quotient a / b is also an integer.
Given n and k, find the first n positive integers which have exactly k distinct positive integer divisors and are not greater than 10^18
. If the total number of such integers is less than n, find all of them.
Input
Two integers n and k (1 ≤ n, k ≤ 110 000) - the number of integers to find and the required number of divisors.
Output
Print n integers, each on a separate line: the first n positive integers which have exactly k distinct positive integer divisors and are not greater than 10^18
, in increasing order. If there are m < n such integers, print the number -1 in each of the remaining n - m lines.