第二个已经很简便了,但是忽略了都不能整除输出n的情况
by liuye20100123 @ 2023-07-26 23:14:14
```c++
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
for(int i = 3;i <= 7;i += 2)
if(n % i == 0)
cout << i << ' ';
return 0;
}
```
by Ke_scholar @ 2023-07-27 00:17:05
@[smart_](/user/542205)
by Ke_scholar @ 2023-07-27 00:17:42
@[Ke_scholar](/user/413779) 那4和6是啥?
by zym0325 @ 2023-07-27 06:19:15
@[smart_](/user/542205) 大概好像没有了
by zym0325 @ 2023-07-27 06:19:46
@[zym0325](/user/804115) 这题也不用4和6啊(
by Ke_scholar @ 2023-07-27 09:34:43
@[Ke_scholar](/user/413779) 所以您的代码判断了4和6啊
by zym0325 @ 2023-07-27 10:33:11
@[zym0325](/user/804115) 没有啊,i+=2不直接跳过4和6了吗
by Ke_scholar @ 2023-07-27 10:48:52
@[liuye20100123](/user/810354) 谢谢
by smart_ @ 2023-07-27 20:44:21
@[Ke_scholar](/user/413779) 谢谢你的新方法
by smart_ @ 2023-07-27 20:44:44