Skip to content

Commit

Permalink
add examples
Browse files Browse the repository at this point in the history
  • Loading branch information
zehengl committed Nov 6, 2023
1 parent 41e8a2f commit 7ea8998
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/attendance2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
n = int(input())
s = []
for _ in range(n):
c = input()
if c == "Present!":
s.pop()
else:
s.append(c)
if not s:
print("No Absences")
else:
print("\n".join(s))
5 changes: 5 additions & 0 deletions src/cornhusker.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
a = [int(d) for d in input().split()]
n, kwf = [int(d) for d in input().split()]
s = sum([a[i] * a[i + 1] for i in range(0, 10, 2)])

print(int(int(s / 5) * n / kwf))

0 comments on commit 7ea8998

Please sign in to comment.