Skip to content

Commit

Permalink
add examples
Browse files Browse the repository at this point in the history
  • Loading branch information
zehengl committed Nov 27, 2024
1 parent 078bc2d commit 44998c3
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/akureyri.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from collections import Counter

n = int(input())
c = Counter()
for i in range(2 * n):
name = input()
if i % 2:
c[name] += 1
for k, v in c.items():
print(k, v)
13 changes: 13 additions & 0 deletions src/frumtolur.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
def is_prime(n):
for i in range(2, n):
if (n % i) == 0:
return False
return True


c, i = 0, 2
while c < 100:
if is_prime(i):
print(i)
c += 1
i += 1
12 changes: 12 additions & 0 deletions src/lettasta.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from collections import Counter

n = int(input())
m = int(input())
g = dict(zip(range(n), input().split()))

c = Counter()
for _ in range(m):
v = [int(d) for d in input().split()]
for i in range(n):
c[g[i]] += v[i]
print(max(c, key=lambda v: c[v]))
1 change: 1 addition & 0 deletions src/lidaskipting.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
print("Neibb" if int(input()) % 3 else "Jebb")

0 comments on commit 44998c3

Please sign in to comment.