Skip to content

Commit

Permalink
add examples
Browse files Browse the repository at this point in the history
  • Loading branch information
zehengl committed Oct 16, 2024
1 parent e97eff7 commit 90f94b8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/freeforminput.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
while True:
try:
s = input()
print(sum(float(n) for n in s.replace(" ", "").split(",")))
except:
break
3 changes: 3 additions & 0 deletions src/thendaysofchristmas.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
n = int(input())
print(n * (n + 1) // 2)
print(sum(i * (i + 1) // 2 for i in range(1, n + 1)))

0 comments on commit 90f94b8

Please sign in to comment.