暴力BUT 0ms
2026-03-19 23:02:11
发布于:江苏
2阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
int f,f1,f2;
int main()
{
int n;
cin>>n;
if(n%3==0)f=1;
if(n%5==0)f1=1;
if(n%7==0)f2=1;
if(f&&f1&&f2)cout<<"3 5 7";
else if(f&&f1)cout<<"3 5";
else if(f&&f2)cout<<"3 7";
else if(f1&&f2)cout<<"5 7";
else if(f)cout<<"3";
else if(f1)cout<<"5";
else if(f2)cout<<"7";
else cout<<"n";//纯暴力
return 0;
}
这里空空如也

有帮助,赞一个