File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ def solution(n: int = 1000) -> int:
21
21
0
22
22
"""
23
23
24
- return sum ([ e for e in range (3 , n ) if e % 3 == 0 or e % 5 == 0 ] )
24
+ return sum (e for e in range (3 , n ) if e % 3 == 0 or e % 5 == 0 )
25
25
26
26
27
27
if __name__ == "__main__" :
Original file line number Diff line number Diff line change 5
5
Find the sum of all the multiples of 3 or 5 below N.
6
6
"""
7
7
8
- """A straightforward pythonic solution using list comprehension"""
8
+ """A straightforward pythonic solution using comprehension"""
9
9
10
10
11
11
def solution (n : int = 1000 ) -> int :
@@ -21,7 +21,7 @@ def solution(n: int = 1000) -> int:
21
21
83700
22
22
"""
23
23
24
- return sum ([ i for i in range (n ) if i % 3 == 0 or i % 5 == 0 ] )
24
+ return sum (i for i in range (n ) if i % 3 == 0 or i % 5 == 0 )
25
25
26
26
27
27
if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments