mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-12-28 12:51:59 +00:00
P1151 子数整数
R39918125
This commit is contained in:
parent
c1a7d1dfbf
commit
4b3ce2cea6
16
problem/P1151/P1151.cpp
Normal file
16
problem/P1151/P1151.cpp
Normal file
@ -0,0 +1,16 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
int k, f = 0;
|
||||
cin >> k;
|
||||
for (int i = 10000; i <= 30000; i++) {
|
||||
if ((i / 100) % k == 0 && (i / 10 - i / 10000 * 1000) % k == 0 && (i - i / 1000 * 1000) % k == 0) {
|
||||
cout << i << endl;
|
||||
f = 1;
|
||||
}
|
||||
}
|
||||
cout << (f ? "" : "No") << endl;
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user