发布网友 发布时间:2022-04-23 15:48
共1个回答
热心网友 时间:2022-05-03 02:30
def isPrime(n):
if n <= 1:
return False
i = 2
while i * i <= n:
if n % i == 0:
return False
i += 1
return True
n = 0
m = 11
while n < 100:
if isPrime(m) and str(m) == str(m)[ ::-1 ]:
n += 1
print('{:>6}'.format(m), end=' ' if n % 10 else '\n')
m += 1