赞
踩
- def nixu(num):
- return(int(str(num)[::-1]))
- a = []
- for i in range(1000,10000):
- for j in range(2,i):
- if i % j == 0:
- break
- else:
- a.append(i)
-
- for i in range(len(a)):
- if nixu(a[i]) in a:
- print("{}和{}为互逆素数".format(a[i], nixu(a[i])))
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。