Type: Default 1000ms 256MiB

最大gcd

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Problem Description

在萌新赛结束后,冯会长在统计大家的成绩的时候不小心把参赛选手的分数全部删掉了,他只记得所有分数的乘积为 pp ,现在他想知道:在所有可能的情况下,选手分数的最大公约数(gcd)的最大可能值是多少?

形式化的说:已知∏i=1nai=p\prod_{i=1}^{n}a_i=p, 求max(gcd(a1,a2,…,an))max(gcd(a_1,a_2,\ldots,a_n)) 。

Input Format

第一行输入两个整数 n,pn,p 表示参赛选手的人数和分数的乘积。

Output Format

输出一个整数,即最大gcd的可能值。

Sample

Input:

3 24

Output:

2

Input:

114 5141919810

Output:

1

Hint

对于所有数据满足 1≤n≤2e5,1≤p≤1e121 \le n \le 2e5,1 \le p \le 1e12。

第十一届重庆邮电大学萌新赛

Not Attended
Status
Done
Rule
XCPC
Problem
10
Start at
2025-11-2 13:00
End at
2025-11-2 18:00
Duration
5 hour(s)
Host
Partic.
3