如果使用了replace()
函数,如何跳过行?
num = int(input());
i = 1111;
while i < 9999:
i = str(i);
i = i.replace("0","1");
if(num % int(i[3]) == 0
and num % int(i[2]) == 0
and num % int(i[1]) == 0
and num % int(i[0]) == 0):
print(i, end=" ");
i = int(i);
i += 1; # **Skip this line if "0" is replaced**