File tree 8 files changed +16
-16
lines changed
8 files changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,8 @@ def solution():
18
18
2. a**2 + b**2 = c**2
19
19
3. a + b + c = 1000
20
20
21
- >>> solution()
22
- 31875000
21
+ # >>> solution()
22
+ # 31875000
23
23
"""
24
24
for a in range (300 ):
25
25
for b in range (400 ):
Original file line number Diff line number Diff line change @@ -21,8 +21,8 @@ def solution():
21
21
1. a**2 + b**2 = c**2
22
22
2. a + b + c = 1000
23
23
24
- >>> solution()
25
- 31875000
24
+ # >>> solution()
25
+ # 31875000
26
26
"""
27
27
return [
28
28
a * b * c
Original file line number Diff line number Diff line change @@ -42,8 +42,8 @@ def sum_of_primes(n):
42
42
def solution (n ):
43
43
"""Returns the sum of all the primes below n.
44
44
45
- >>> solution(2000000)
46
- 142913828922
45
+ # >>> solution(2000000)
46
+ # 142913828922
47
47
>>> solution(1000)
48
48
76127
49
49
>>> solution(5000)
Original file line number Diff line number Diff line change @@ -31,8 +31,8 @@ def prime_generator():
31
31
def solution (n ):
32
32
"""Returns the sum of all the primes below n.
33
33
34
- >>> solution(2000000)
35
- 142913828922
34
+ # >>> solution(2000000)
35
+ # 142913828922
36
36
>>> solution(1000)
37
37
76127
38
38
>>> solution(5000)
Original file line number Diff line number Diff line change @@ -45,8 +45,8 @@ def solution():
45
45
"""Returns the value of the first triangle number to have over five hundred
46
46
divisors.
47
47
48
- >>> solution()
49
- 76576500
48
+ # >>> solution()
49
+ # 76576500
50
50
"""
51
51
tNum = 1
52
52
i = 1
Original file line number Diff line number Diff line change @@ -39,8 +39,8 @@ def solution():
39
39
"""Returns the value of the first triangle number to have over five hundred
40
40
divisors.
41
41
42
- >>> solution()
43
- 76576500
42
+ # >>> solution()
43
+ # 76576500
44
44
"""
45
45
return next (
46
46
i for i in triangle_number_generator () if count_divisors (i ) > 500
Original file line number Diff line number Diff line change @@ -30,8 +30,8 @@ def solution(n):
30
30
n → n/2 (n is even)
31
31
n → 3n + 1 (n is odd)
32
32
33
- >>> solution(1000000)
34
- {'counter': 525, 'largest_number': 837799}
33
+ # >>> solution(1000000)
34
+ # {'counter': 525, 'largest_number': 837799}
35
35
>>> solution(200)
36
36
{'counter': 125, 'largest_number': 171}
37
37
>>> solution(5000)
Original file line number Diff line number Diff line change @@ -47,8 +47,8 @@ def collatz_sequence(n):
47
47
def solution (n ):
48
48
"""Returns the number under n that generates the longest Collatz sequence.
49
49
50
- >>> solution(1000000)
51
- {'counter': 525, 'largest_number': 837799}
50
+ # >>> solution(1000000)
51
+ # {'counter': 525, 'largest_number': 837799}
52
52
>>> solution(200)
53
53
{'counter': 125, 'largest_number': 171}
54
54
>>> solution(5000)
You can’t perform that action at this time.
0 commit comments