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 54f6d1f commit 1568432Copy full SHA for 1568432
Project Euler/Problem 01/sol4.py
@@ -0,0 +1,32 @@
1
+def mulitples(limit):
2
+ xmulti = []
3
+ zmulti = []
4
+ z = 3
5
+ x = 5
6
+ temp = 1
7
+ while True:
8
+ result = z * temp
9
+ if (result < limit):
10
+ zmulti.append(result)
11
+ temp += 1
12
+ continue
13
+ else:
14
15
+ break
16
17
+ result = x * temp
18
19
+ xmulti.append(result)
20
21
22
23
24
25
+ return (sum(zmulti) + sum(xmulti))
26
+
27
28
29
30
31
32
+print (mulitples(100))
0 commit comments