Python-Project Euler 52
2014-01-20 17:48
260 查看
f=[]
def cl(x):
global f
f=[]
while x>0:
s=x%10
if s not in f:
f.append(s)
x//=10
def check(x):
global f
while x>0:
s=x%10
if s not in f:
return False
x//=10
return True
for i in range(1,1000000):
cl(i)
if check(2*i) and check(3*i) and check(4*i) and check(5*i) and check(6*i):
print(i)
def cl(x):
global f
f=[]
while x>0:
s=x%10
if s not in f:
f.append(s)
x//=10
def check(x):
global f
while x>0:
s=x%10
if s not in f:
return False
x//=10
return True
for i in range(1,1000000):
cl(i)
if check(2*i) and check(3*i) and check(4*i) and check(5*i) and check(6*i):
print(i)
相关文章推荐
- 笨办法学 Python · 续 练习 52:`moreweb`
- Python-Project Euler 36
- Python-Project Euler 82
- Python-Project Euler 43
- Python-Project Euler 67
- Python-Project Euler 83
- Project Euler 52
- Python Project Euler 012:500个约数的三角形数
- 环境python3+selenium3+火狐52版本
- Python实现Project Euler 5
- Python-Project Euler 24
- Python-Project Euler 48
- project euler 52
- Project Euler 52题 Permuted multiples
- Python-Project Euler 37
- python--笨方法学python 习题52
- Python学习52 爬虫学习(图片和有道翻译)
- Python-Project Euler 26
- 笨方法学python习题52——创建web游戏
- Python-Project Euler 27