Skip to content

Commit

Permalink
Solve Sum of Consecutive Even Numbers in python
Browse files Browse the repository at this point in the history
  • Loading branch information
deniscostadsc committed Dec 10, 2024
1 parent b826c9d commit 6b0f7a6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions solutions/beecrowd/1159/1159.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import sys


def sum_five_consecutive_even_numbers(number):
return sum(filter(lambda x: x % 2 == 0, range(number, number + 10)))


for line in sys.stdin:
number = int(line)
if number:
print(sum_five_consecutive_even_numbers(number))

0 comments on commit 6b0f7a6

Please sign in to comment.