#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll n;
ll zi[10005],cnt[10005];
///转换成质数的积
ll k=0;
int main(){
    cin>>n;
    ll p=n;
    for (ll i = 2; i*i <= p ; ++i) {
            if(p%i==0) {
                k++;
                while (p % i == 0) {
                    zi[k] = i;
                    cnt[k]++;
                    p /= i;
                }
            }
    }
    ll ans=1;
    if(p>1){
        zi[++k]=p;
        cnt[k]++;
    }
    for (ll i = 1; i <=k ; ++i) {
        if(cnt[i]%2==1){
            ans*=zi[i];
        }
    }
    cout<<ans;
}
#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll n,x;
const int mod=1e9+7;
unordered_map<ll,ll>has;
int main(){
    cin>>n;
    while (n--){
        cin>>x;
        for (int i = 2; i <=x/i ; ++i) {
            while (x%i==0){
                has[i]++;
                x/=i;
            }
        }
        if(x>1)
            has[x]++;
    }
    ll cnt=1;
    for( auto p : has ){
        cnt =cnt * (p.second+1)%mod;
    }
    cout<<cnt;
}
posted on 2023-03-04 13:45  IR101  阅读(30)  评论(0编辑  收藏  举报  来源