fixed solution 4 of problem 1

This commit is contained in:
Christian Bender 2018-04-15 23:52:45 +02:00
parent a2b540f736
commit 10b0a40b2e

View File

@ -9,7 +9,6 @@ def mulitples(limit):
if (result < limit):
zmulti.append(result)
temp += 1
continue
else:
temp = 1
break
@ -18,15 +17,14 @@ def mulitples(limit):
if (result < limit):
xmulti.append(result)
temp += 1
continue
else:
temp = 1
break
return (sum(zmulti) + sum(xmulti))
collection = list(set(xmulti+zmulti))
return (sum(collection))
print (mulitples(100))
print (mulitples(1000))