Skip to content

Commit

Permalink
add examples
Browse files Browse the repository at this point in the history
  • Loading branch information
zehengl committed Oct 7, 2024
1 parent 7d0671b commit d23c6dc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/callforproblems.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
n = int(input())
d = [int(input()) for _ in range(n)]
print(sum(v % 2 for v in d))
12 changes: 12 additions & 0 deletions src/composedrhythms.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
n = int(input())
threes = n // 3
remainder = n % 3
if remainder == 1:
twos = 2
threes -= 1
elif remainder == 2:
twos = 1
else:
twos = 0
print(threes + twos)
print(*(threes * ["3"] + twos * ["2"]))

0 comments on commit d23c6dc

Please sign in to comment.