竞赛
考级
幼儿园做的题,真的不难 AC CODE:
hutaoQWQ
法兰西玫瑰
yy
#include<iostream> using namespace std; int main(){ int n; cin>>n; if(n%30){ cout<<"3"<<" "; } if(n%50){ cout<<"5"<<" "; } if(n%7==0){ cout<<"7"<<" "; } if(n%3!=0&&n%5!=0&&n%7!=0){ cout<<"n"; } return 0; }
对方正在输入...
YuQing1919
#include <iostream> using namespace std; int main(){ int a; cin>>a; if (a%1050){ cout<<"3 5 7"; }else if (a%150){ cout<<"3 5"; }else if (a%350){ cout<<"5 7"; }else if (a%210){ cout<<"3 7"; }else if (a%30&&a%35!=0){ cout<<"3"; }else if (a%50&&a%21!=0){ cout<<"5"; }else if (a%7==0&&a%15!=0){ cout<<"7"; }else{ cout<<"n"; } return 0; }
186****1628
真简单 AC
荷取青
#include <iostream> using namespace std; int main(){ int a; cin >> a; if (a % 3 == 0||a % 5 == 0||a % 7 == 0){ if(a % 3 == 0&&a % 5 == 0&&a % 7 == 0){ cout << "3 5 7"; }else if(a % 3 == 0&&a % 5 == 0){ cout << "3 5"; }else if(a % 5 == 0&&a % 7 == 0){ cout << "5 7"; }else if(a % 3 == 0&&a % 7 == 0){ cout << "3 7"; }else if(a % 3 == 0){ cout << "3"; }else if(a % 5 == 0){ cout << "5"; }else{ cout << "7"; } }else{ cout << "n"; } return 0; }
C++真真真难啊啊啊
#include <iostream> using namespace std; int main() { int n; cin >> n; if (n%3 == 0 && n%5 == 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%7 == 0 && n%5 == 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; }
源于惯性yoki
#include <bits/stdc++.h> using namespace std; int main () { int n; cin>>n; }
浴谷不是很好用
acgoacgo
a=int(input()) if a%30: print(3,end=' ') if a%50: print(5,end=' ') if a%7==0: print(7) if a%3!=0 and a%5!=0 and a%7!=0: print('n')
137****3875
#include<bits/stdc++.h> using namespace std; int main(){ int x; cin>>x; if(x%30){ cout<<3<<" "; }if(x%50){ cout<<5<<" "; }if(x%7==0){ cout<<7<<" "; }if(x%3!=0&&x%5!=0&&x%7!=0){ cout<<"n"; } return 0; }
vlknd;fbgdanbh'k
保过
李睿尧
#include <iostream> using namespace std; int main() { int n; cin>>n; int a[4]={0,3,5,7},flag=0; for(int i=1;i<=3;i++){ if(n%a[i]0) { cout<<a[i]<<" "; flag=1; } } if(flag0) cout<<"n"<<endl; return 0; }
葬仪_亡蝶舞
#include <iostream> #include <cmath> using namespace std; int main() { int a; cin>>a; if(a%30){ cout<<'3'<<' '; } if(a%50){ cout<<"5"<<" "; } if(a%7==0){ cout<<"7"<<" "; } else if(a%3!=0 && a%5!=0 && a%7!=0){ cout<<"n"; } }
/程泊远/ 被困惠州蓝湖集中营
#include<iostream> using namespace std; int main(){ int a; cin >>a; if(a%30) cout << 3 << " "; if(a%50) cout << 5 << " "; if(a%7==0) cout << 7 << " "; if(a%3!=0&&a%5!=0&&a%7!=0) cout << "n"; }
🕈.👎.☝✌💧❄☜☼
陈炜涵
#include <iostream> using namespace std; int main(){ int m; cin>>m; if(m%30 && m%50 && m%70){ cout<<3<<" "<<5<<" "<<7; } else{ if(m%30){ cout<<3<<" "; } if(m%50){ cout<<5<<" "; } if(m%70){ cout<<7<<" "; } if(m%3!=0 && m%5!=0 && m%7!=0){ cout<<'n'; } } return 0; }
新人
潮水。
共26条