We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a2b540f commit 10b0a40Copy full SHA for 10b0a40
Project Euler/Problem 01/sol4.py
@@ -9,7 +9,6 @@ def mulitples(limit):
9
if (result < limit):
10
zmulti.append(result)
11
temp += 1
12
- continue
13
else:
14
temp = 1
15
break
@@ -18,15 +17,14 @@ def mulitples(limit):
18
17
19
xmulti.append(result)
20
21
22
23
- temp = 1
24
25
- return (sum(zmulti) + sum(xmulti))
+ collection = list(set(xmulti+zmulti))
+ return (sum(collection))
26
27
28
29
30
31
32
-print (mulitples(100))
+print (mulitples(1000))
0 commit comments