File tree 7 files changed +21
-14
lines changed
7 files changed +21
-14
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,9 @@ 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
+ # The code below has been commented due to slow execution affecting Travis.
22
+ # >>> solution()
23
+ # 31875000
23
24
"""
24
25
for a in range (300 ):
25
26
for b in range (400 ):
Original file line number Diff line number Diff line change @@ -42,8 +42,9 @@ 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
+ # The code below has been commented due to slow execution affecting Travis.
46
+ # >>> solution(2000000)
47
+ # 142913828922
47
48
>>> solution(1000)
48
49
76127
49
50
>>> solution(5000)
Original file line number Diff line number Diff line change @@ -31,8 +31,9 @@ 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
+ # The code below has been commented due to slow execution affecting Travis.
35
+ # >>> solution(2000000)
36
+ # 142913828922
36
37
>>> solution(1000)
37
38
76127
38
39
>>> solution(5000)
Original file line number Diff line number Diff line change @@ -45,8 +45,9 @@ 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
+ # The code below has been commented due to slow execution affecting Travis.
49
+ # >>> solution()
50
+ # 76576500
50
51
"""
51
52
tNum = 1
52
53
i = 1
Original file line number Diff line number Diff line change @@ -39,8 +39,9 @@ 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
+ # The code below has been commented due to slow execution affecting Travis.
43
+ # >>> solution()
44
+ # 76576500
44
45
"""
45
46
return next (
46
47
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,9 @@ 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
+ # The code below has been commented due to slow execution affecting Travis.
34
+ # >>> solution(1000000)
35
+ # {'counter': 525, 'largest_number': 837799}
35
36
>>> solution(200)
36
37
{'counter': 125, 'largest_number': 171}
37
38
>>> solution(5000)
Original file line number Diff line number Diff line change @@ -47,8 +47,9 @@ 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
+ # The code below has been commented due to slow execution affecting Travis.
51
+ # >>> solution(1000000)
52
+ # {'counter': 525, 'largest_number': 837799}
52
53
>>> solution(200)
53
54
{'counter': 125, 'largest_number': 171}
54
55
>>> solution(5000)
You can’t perform that action at this time.
0 commit comments