diff options
Diffstat (limited to 'Problem52.py')
-rw-r--r-- | Problem52.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Problem52.py b/Problem52.py new file mode 100644 index 0000000..664a8d6 --- /dev/null +++ b/Problem52.py @@ -0,0 +1,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)
\ No newline at end of file |