blob: 664a8d62ee26f573265e274a257df6f9a33f0578 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
def sharesdigits(n):
numstring = str(n)
two,three,four,five,six = str(2*n),str(3*n),str(4*n),str(5*n),str(6*n)
for x in range(0,len(numstring)):
if numstring.count(numstring[x]) != two.count(numstring[x]): return False
elif numstring.count(numstring[x]) != three.count(numstring[x]): return False
elif numstring.count(numstring[x]) != four.count(numstring[x]): return False
elif numstring.count(numstring[x]) != five.count(numstring[x]): return False
elif numstring.count(numstring[x]) != six.count(numstring[x]): return False
return True
x = 1
while sharesdigits(x) == False:
x+=1
print(x)
|