example
root of 1 as 1*sqrt{1}
root of 2 as 1*sqrt{2}
root of 3 as 1*sqrt{3}
root of 9 as 3*sqrt{1}
I tried to find a algorithm like below:
for(i=sqrt(n);i>=1;i--)
if(n%(i*i)==0) {
break;
}
cout<<i<<' '<<n/(i*i)<<endl;
but it is not good when n is big number
so can you tell me a algorithm for this problem ? thank you so much!