'commit'
This commit is contained in:
27
TangDou/AoSaiYiBenTong/YBT1047.cpp
Normal file
27
TangDou/AoSaiYiBenTong/YBT1047.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
//cin读入优化
|
||||
std::ios::sync_with_stdio(false);
|
||||
int n;
|
||||
cin >> n;
|
||||
bool success = false;
|
||||
|
||||
if (n % 3 == 0) {
|
||||
cout << 3 << " ";
|
||||
success = true;
|
||||
}
|
||||
if (n % 5 == 0) {
|
||||
cout << 5 << " ";
|
||||
success = true;
|
||||
}
|
||||
if (n % 7 == 0) {
|
||||
cout << 7 << " ";
|
||||
success = true;
|
||||
}
|
||||
if (!success)
|
||||
cout << "n" << endl;
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user