#include <bits/stdc++.h>
using namespace std;
int main()
{
int n,a[100000]={0},p=0,m=0;
cin >> n;
m=n;
int i=2;
while(n>1)
{
while( n%i == 0 )
{
a[p]=i;
p++;
n=n/i;
}
i++;
}
int ans=1,ans1=1;
for(int i=0;i<p;i++){
for(int j=0;j<p;j++){
if(i!=j&&a[i]==a[j]&&a[i]!=0&&a[j]!=0) {ans=ans*a[i];a[i]=0;a[j]=0;}
}
}for(int i=0;i<p;i++){
if(a[i]!=0) ans1=ans1*a[i];
}
if(ans!=1) cout<< ans << " ";
if(ans1!=1)cout << "sqrt("<< ans1 << ")" <<endl;
return 0;
}
Killed
(為什麼沒過呀呀呀)