From 1161f9a034de06a63538e3a9a0b7717098c744d9 Mon Sep 17 00:00:00 2001 From: Joshua Drake Date: Fri, 7 Apr 2023 08:13:49 -0500 Subject: Initial Commit --- Problem52.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Problem52.py (limited to 'Problem52.py') 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 -- cgit v1.2.3