Skip to content

Commit

Permalink
add examples
Browse files Browse the repository at this point in the history
  • Loading branch information
zehengl committed Apr 15, 2024
1 parent 56e5afe commit 29e8141
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/bestagjofin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
n = int(input())
d = {}
for _ in range(n):
k, v = input().split()
v = int(v)
d[k] = v
print(max(d, key=lambda k: d[k]))
2 changes: 2 additions & 0 deletions src/bladra2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
v, a, t = [int(d) for d in input().split()]
print(f"{v*t+a*t*t/2:.5f}")
2 changes: 2 additions & 0 deletions src/fyrirtaekjanafn.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
s = input()
print("".join(c for c in s if c.lower() in "aeiouy"))
3 changes: 3 additions & 0 deletions src/hipphipp.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
for _ = 1, 20 do
print("Hipp hipp hurra!")
end
2 changes: 2 additions & 0 deletions src/hipphipp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
for _ in range(20):
print("Hipp hipp hurra!")
4 changes: 4 additions & 0 deletions src/hipphipphurra.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
n = input()
x = int(input())
for _ in range(x):
print(f"Hipp hipp hurra, {n}!")
3 changes: 3 additions & 0 deletions src/kinahvisl.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
s1 = input()
s2 = input()
print(sum(a != b for a, b in zip(s1, s2)) + 1)
2 changes: 2 additions & 0 deletions src/storafmaeli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
n = int(input())
print("Jebb" if n % 10 == 0 else "Neibb")
3 changes: 3 additions & 0 deletions src/takkfyrirmig.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
n = int(input())
for _ in range(n):
print(f"Takk {input()}")
1 change: 1 addition & 0 deletions src/tilhamingju.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
print("TIL HAMINGJU MED AFMAELID FORRITUNARKEPPNI FRAMHALDSSKOLANNA!")
10 changes: 10 additions & 0 deletions src/toktik.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
n = int(input())
d = {}
for _ in range(n):
s, v = input().split()
v = int(v)
if s not in d:
d[s] = v
else:
d[s] += v
print(max(d, key=lambda k: d[k]))

0 comments on commit 29e8141

Please sign in to comment.