summaryrefslogtreecommitdiff
path: root/Problem52.py
diff options
context:
space:
mode:
authorJoshua Drake <joshua.drake@ditchwitch.com>2023-04-07 08:13:49 -0500
committerJoshua Drake <joshua.drake@ditchwitch.com>2023-04-07 08:13:49 -0500
commit1161f9a034de06a63538e3a9a0b7717098c744d9 (patch)
tree55bb842b2daa4f096eb7916a8d3630426fc1c376 /Problem52.py
Initial CommitHEADmaster
Diffstat (limited to 'Problem52.py')
-rw-r--r--Problem52.py14
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