4495: Least Prime factor
时间限制(普通/Java):3000MS/9000MS运行内存限制:65536KByte
总提交: 38 测试通过:3
描述
Findthe N-th smallest positive integer whose least prime factor is P.
输入
Theinput case has one line containing two integers N and P (1 ≤ N, P ≤ 109).P is a prime number.
输出
Outputthe expected result in one line. If the result is larger than 109,just output 0.
样例输入
1 2
样例输出
2
题目来源
题目上传者