问题1624--Factorization

1624: Factorization

时间限制: 1Sec 内存限制:256 MB
提交:34 解决:7
[ 状态] [ 讨论版] [ 提交] [命题人: ]
题目描述
You are given a positive integer n(n > 1). Consider all the different prime divisors of n. Each of
them is included in the expansion n into prime factors in some degree.
Assume n = p 1 e1p 2 e2... p m em, where p iare different prime divisors of n and ei ≥ 1. Your task is to find
the greatest common divisor of e1,e2,..., em.
输入
The first line of the input contains an integer T(1 ≤ T ≤ 10000), denoting the number of test cases.
In each test case, there is only one integer n(2 ≤ n ≤ 10 18).
输出
For each test case, print a single line containing an integer, denoting the answer.
样例输入 Copy
3 4 6 36
样例输出 Copy
2 1 2
来源/分类