题解
2023-12-30 09:53:25
发布于:广东
3阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
if(n%3==0 and n%5==0 and n%7==0) cout<<"3 5 7";
else if(n%3==0 and n%5==0) cout<<"3 5";
else if(n%3==0 and n%7==0) cout<<"3 7";
else if(n%5==0 and n%7==0) cout<<"5 7";
else if(n%3==0) cout<<"3";
else if(n%5==0) cout<<"5";
else if(n%7==0) cout<<"7";
else cout<<"n";
return 0;
}
这里空空如也
有帮助,赞一个