mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-24 05:21:09 +00:00
Merge pull request #292 from TheAlgorithms/fixed_solv_4_problem1
fixed solution 4 of problem 1
This commit is contained in:
commit
ca5c6f268a
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue
Block a user