5 条题解
-
712239姚与露 (12239姚与露) LV 7 @ 2021-11-15 09:40:04
#include<iostream>
#include<cmath>
#include<iomanip>
using namespace std;
int main()
{
int n;
cin>>n;
if(n%3==0&&n%5==0&&n%7==0)
cout<<"3"<<" "<<"5"<<" "<<"7"<<endl;
else if(n%15==0)
cout<<"3"<<" "<<"5"<<endl;
else if(n%21==0)
cout<<"3"<<" "<<"7"<<endl;
else if(n%35==0)
cout<<"5"<<" "<<"7"<<endl;
else if(n%3==0)
cout<<"3"<<endl;
else if(n%5==0)
cout<<"5"<<endl;
else if(n%7==0)
cout<<"7"<<endl;
else cout<<"no"<<endl;
return 0;
} -
02021-11-02 22:18:25@
#include<iostream>
using namespace std;
int main()
{
int n;
cin>>n;
if(n%5==0&&n%3==0&&n%7==0)
{
cout<<3<<' '<<5<<' '<<7;
}
else if(n%3==0&&n%5==0)
{
cout<<3<<' '<<5;
}
else if(n%3==0&&n%7==0)
{
cout<<3<<' '<<7;
}
else if(n%5==0&&n%7==0)
{
cout<<5<<' '<<7;
}
else if(n%5==0)
{
cout<<5;
}
else if(n%3==0)
{
cout<<3;
}
else if(n%7==0)
{
cout<<5;
}
else
{
cout<<"no";
}
return 0;
} -
-12021-12-18 15:54:25@
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
int x;
cin>>x;
if(x%3==0&&x%5==0&&x%7==0)
cout<<"3 5 7";
else if(x%3==0&&x%5==0)
cout<<"3 5";
else if(x%5==0&&x%7==0)
cout<<"5 7";
else if(x%3==0&&x%7==0)
cout<<"3 7";
else if(x%3==0)
cout<<3;
else if(x%5==0)
cout<<5;
else if(x%7==0)
cout<<7;
else cout<<"no";
return 0;
} -
-12021-10-30 12:01:47@
#include<iostream>
using namespace std;
int main()
{
int n;
cin >> n;
if(n % 5 == 0 && n % 3 == 0 && n % 7 == 0)
{
cout << 3 <<' ' << 5 <<' ' << 7;
}
else if(n % 3 == 0&& n % 5 == 0)
{
cout << 3 << ' ' << 5;
}
else if(n% 3 == 0 && n % 7 == 0)
{
cout << 3 << ' ' << 7;
}
else if(n % 5 == 0&& n % 7 == 0)
{
cout << 5 << ' ' << 7;
}
else if(n % 5 == 0)
{
cout << 5;
}
else if(n % 3 == 0)
{
cout << 3;
}
else if(n % 7==0)
{
cout << 5;
}
else
{
cout << "no";
}
return 0;
} -
-12021-10-25 09:56:36@
#include<iostream>
using namespace std;
int main()
{
int n;
cin >> n;
if(n % 5 == 0 && n % 3 == 0 && n % 7 == 0){
cout << 3 <<' ' << 5 <<' ' << 7;
}else if(n % 3 == 0&& n % 5 == 0){
cout << 3 << ' ' << 5;
}else if(n% 3 == 0 && n % 7 == 0){
cout << 3 << ' ' << 7;
}else if(n % 5 == 0&& n % 7 == 0){
cout << 5 << ' ' << 7;
}else if(n % 5 == 0){
cout << 5;
}else if(n % 3 == 0){
cout << 3;
}else if(n % 7==0){
cout << 5;
}else{
cout << "no";
}
return 0;
}
- 1
信息
- ID
- 1703
- 难度
- 3
- 分类
- (无)
- 标签
- 递交数
- 242
- 已通过
- 115
- 通过率
- 48%
- 被复制
- 2
- 上传者