```cpp
#include <bits/stdc++.h>
using namespace std;
int main(){
int a;
cin >> a;
for(int i = 2; i <= a; i++){
if(a % i == 0){
cout << a / i;
break;
}
}
return 0;
}
```
@[是个火山a](/space/show?uid=209923) @[tohmasu](/space/show?uid=186119) 我改完惹 是这样吗
by Peter0721 @ 2019-09-24 18:20:21
@[Peter0721](/space/show?uid=242736) 这是对的;%%%
~~但是不知道会不会超时,应该不会超时吧。~~
by tohmasu @ 2019-09-24 18:23:30
~~加个$i$*$i$<=$a$吧,我看着难受~~
by 超级小周 @ 2019-09-24 18:23:36
@[超级小周](/space/show?uid=187772) ~~其实写成 i <= a 会更快哦。因为只要找到最小质因数程序就结束了~~
by tohmasu @ 2019-09-24 18:24:47
OK了
by qwq_volcano @ 2019-09-24 18:25:36
@[NaCly_Fish](/space/show?uid=115864) @[欧鹰](/space/show?uid=174026) @[tohmasu](/space/show?uid=186119) @[是个火山a](/space/show?uid=209923) AC了,谢谢各位
by Peter0721 @ 2019-09-24 18:26:44
@[tohmasu](/space/show?uid=186119) %%%
by 超级小周 @ 2019-09-24 18:29:04
~~(我是来灌水的)~~
~~头像好评,你也玩人格吗~~
by 蒟蒻取不来名 @ 2019-09-24 18:42:04
@[蒟蒻取不来名](/space/show?uid=226067) emm是的。~~不好意思现在才回复~~
by Peter0721 @ 2019-10-08 18:39:47