#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
int main() {
int k,c = 0;
cin >> k;
for(int i = 10000; i <= 30000; i++) {
int t = i,one,two,three;
one = t / 100;
two = t / 10 % 1000;
three = t % 1000;
if(one % k == 0 && two % k == 0 && three % k == 0) {
cout << i << endl;
c++;//利用计数来判断
}
}
if(c == 0) {//如果c没有计数
cout << "No" << endl;
}
return 0;
}
如果帮助到了你,请点赞鼓励一下,谢谢!