2 条题解
-
-2
#include<bits/stdc++.h> using namespace std; int main() { int a,b,c,d,e,f,g,h; cin>>a; b=a%3==0; c=a%5==0; d=a%7==0; e=b && c; f=c && d; g=b && d; h=b && c && d; if(h) { cout<<"3 5 7"; } else if(e) { cout<<"3 5"; } else if(f) { cout<<"5 7"; } else if(g) { cout<<"3 7"; } else if(b) { cout<<"3"; } else if(c) { cout<<"5"; } else if(d) { cout<<"7"; } else { cout<<'n'; } return 0; }
信息
- 编号
- 2309
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 2
- 标签
- 递交数
- 100
- 已通过
- 54
- 上传者