0分求助

B2043 判断能否被 3,5,7 整除

@[zml1029](/user/1375600) 大哥啊,题目没让你输出YES或者NO啊。 ```cpp #include <iostream> using namespace std; int main() { int a; cin>>a; if(a%3==0&&a%5==0&&a%7==0){ cout<<"3 5 7"; }else if(a%3!=0&&a%5!=0&&a%7!=0){ cout<<"n"; }else if(a%3==0&&a%5==0){ cout<<"3 5"; }else if(a%3==0&&a%7==0){ cout<<"3 7"; }else if(a%5==0&&a%7==0){ cout<<"5 7"; } return 0; } ```
by ATION001 @ 2024-07-30 12:49:27


仔细读题啊,不要什么都问问问
by Mr_yang1 @ 2024-07-30 12:49:56


看看题面吧
by SuDeRui @ 2024-07-30 12:50:08


《yes和no》
by losti @ 2024-07-30 12:51:03


。。。。。。
by rabbit_Cicy @ 2024-07-30 12:52:34


666
by haimingbei @ 2024-07-30 12:55:47


真·《输出YES》
by Yue_Hao @ 2024-08-02 20:29:13


@[zml1029](/user/1375600) ```cpp #include <bits/stdc++.h> using namespace std; int x; int main() { cin >> x; if (x % 3 == 0 && x % 5 == 0 && x % 7 == 0) cout << "3 5 7"; else if (x % 3 == 0 && x % 5 == 0 && x % 7 != 0) cout << "3 5"; else if (x % 3 == 0 && x % 7 == 0 && x % 5 != 0) cout << "3 7"; else if (x % 5 == 0 && x % 7 == 0 && x % 3 != 0) cout << "5 7"; else if (x % 3 == 0 && x % 5 != 0 && x % 7 != 0) cout << "3"; else if (x % 5 == 0 && x % 3 != 0 && x % 7 != 0) cout << "5"; else if (x % 7 == 0 && x % 3 != 0 && x % 5 != 0) cout << "7"; else cout << "n"; return 0; } ``` 哈哈哈!
by moyijidolin @ 2024-08-03 22:58:29


俗世奇人
by WPL0216 @ 2024-08-05 13:31:43


请 _**认真审题**_
by Yews @ 2024-08-15 19:56:44


|