B. Duff in Love
Time Limit: 1 Sec
Memory Limit: 256 MB
题目连接
http://codeforces.com/contest/588/problem/B
Description
Duff is in love with lovely numbers! A positive integer x is called lovely if and only if there is no such positive integer a > 1 such that a2 is a divisor of x.
Malek has a number store! In his store, he has only divisors of positive integer n (and he has all of them). As a birthday present, Malek wants to give her a lovely number from his store. He wants this number to be as big as possible.
Malek always had issues in math, so he asked for your help. Please tell him what is the biggest lovely number in his store.
Input
The first and only line of input contains one integer, n (1 ≤ n ≤ 1012).
Output
Print the answer in one line.
Sample Input
HINT
题意
给你一个数p,然后让你找到一个最大的数x,要求满足这个x是p的因子,并且p的因子中没有平方数
题解:
对于这个数p,我们进行质因数分解就好了,分解之后,每一个质因数都只选择一个就行了
代码:
//qscqesze#include #include #include #include #include #include #include #include #include #include #include #include #include #include