*/
public class P1151 {
public static void main(String args[]) {
Scanner scanner = new Scanner(System.in);
int k = scanner.nextInt();
int c = 30207;
String a,a1,b1,c1;
int count = 0;
for(int i = 10000;i<=30000;i++) {
a = String.valueOf(i);
a1 = a.substring(0, 3);
b1 = a.substring(1, 4);
c1 = a.substring(2, 5);
if(Integer.valueOf(a1)%k==0 && Integer.valueOf(b1)%k==0 && Integer.valueOf(c1)%k==0) {
System.out.println(i);
count ++;
}
}
if(count == 0) {
System.out.println("No");
}
}
}
[
![](https://img-blog.csdnimg.cn/fce44ffe4f1f493b84f6e057060c9c93.png)
创作打卡挑战赛 ![](https://img-blog.csdnimg.cn/img_convert/b43b47a5d21b6983cb5937bb49bcb6a3.png)
赢取流量/现金/CSDN周边激励大奖
](https://mp.csdn.net/clock?utm_campaign=marketingcard&utm_source=qq_43290288&utm_content=121588284)
?utm_campaign=marketingcard&utm_source=qq_43290288&utm_content=121588284)