```cpp
#include <bits/stdc++.h>
using namespace std;
bool ss(int x){
int i;
if(x==2) return 1;
for(i=2;i<=sqrt(x);i++){
if(x%i==0) return 0;
}
return 1;
}
int main(){
int a;
cin>>a;
for(int i=2;i<a/2;i++){
if(a%i==0){
if(ss(i)){
cout<<a/i;
break;
}
}
}
}
```
by _th_tw_on_ @ 2024-04-23 13:52:31
你代码的循环是从 $0$ 开始的,而 `%0` 是会报错的。
by _th_tw_on_ @ 2024-04-23 13:55:57