RT。
#include<iostream>
using namespace std;
int main(){
int n,s[1005],cnt=0;
cin>>n;
for(int i=1;i<n;i++){
bool flag=true;
for(int j=0;j<i;j++){
if(i%j==0)flag=false;
}
if(flag){
s[cnt]=i;
cnt++;
}
}
for(int i=0;i<cnt;i++){
for(int j=i;j<cnt;j++){
if(s[j]*s[i]==n){
cout<<j;
return 0;
}
}
}
return 0;
}