From 29e81414d5dc8a31154f22a7df2989cefb173b54 Mon Sep 17 00:00:00 2001 From: Zeheng Li Date: Mon, 15 Apr 2024 10:53:34 -0600 Subject: [PATCH] add examples --- src/bestagjofin.py | 7 +++++++ src/bladra2.py | 2 ++ src/fyrirtaekjanafn.py | 2 ++ src/hipphipp.lua | 3 +++ src/hipphipp.py | 2 ++ src/hipphipphurra.py | 4 ++++ src/kinahvisl.py | 3 +++ src/storafmaeli.py | 2 ++ src/takkfyrirmig.py | 3 +++ src/tilhamingju.py | 1 + src/toktik.py | 10 ++++++++++ 11 files changed, 39 insertions(+) create mode 100644 src/bestagjofin.py create mode 100644 src/bladra2.py create mode 100644 src/fyrirtaekjanafn.py create mode 100644 src/hipphipp.lua create mode 100644 src/hipphipp.py create mode 100644 src/hipphipphurra.py create mode 100644 src/kinahvisl.py create mode 100644 src/storafmaeli.py create mode 100644 src/takkfyrirmig.py create mode 100644 src/tilhamingju.py create mode 100644 src/toktik.py diff --git a/src/bestagjofin.py b/src/bestagjofin.py new file mode 100644 index 0000000..82bcedb --- /dev/null +++ b/src/bestagjofin.py @@ -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])) diff --git a/src/bladra2.py b/src/bladra2.py new file mode 100644 index 0000000..dd8318b --- /dev/null +++ b/src/bladra2.py @@ -0,0 +1,2 @@ +v, a, t = [int(d) for d in input().split()] +print(f"{v*t+a*t*t/2:.5f}") diff --git a/src/fyrirtaekjanafn.py b/src/fyrirtaekjanafn.py new file mode 100644 index 0000000..eb8ffa2 --- /dev/null +++ b/src/fyrirtaekjanafn.py @@ -0,0 +1,2 @@ +s = input() +print("".join(c for c in s if c.lower() in "aeiouy")) diff --git a/src/hipphipp.lua b/src/hipphipp.lua new file mode 100644 index 0000000..ff8d8b6 --- /dev/null +++ b/src/hipphipp.lua @@ -0,0 +1,3 @@ +for _ = 1, 20 do + print("Hipp hipp hurra!") +end diff --git a/src/hipphipp.py b/src/hipphipp.py new file mode 100644 index 0000000..4b5387d --- /dev/null +++ b/src/hipphipp.py @@ -0,0 +1,2 @@ +for _ in range(20): + print("Hipp hipp hurra!") diff --git a/src/hipphipphurra.py b/src/hipphipphurra.py new file mode 100644 index 0000000..5973c43 --- /dev/null +++ b/src/hipphipphurra.py @@ -0,0 +1,4 @@ +n = input() +x = int(input()) +for _ in range(x): + print(f"Hipp hipp hurra, {n}!") diff --git a/src/kinahvisl.py b/src/kinahvisl.py new file mode 100644 index 0000000..9f0f498 --- /dev/null +++ b/src/kinahvisl.py @@ -0,0 +1,3 @@ +s1 = input() +s2 = input() +print(sum(a != b for a, b in zip(s1, s2)) + 1) diff --git a/src/storafmaeli.py b/src/storafmaeli.py new file mode 100644 index 0000000..c7f6e24 --- /dev/null +++ b/src/storafmaeli.py @@ -0,0 +1,2 @@ +n = int(input()) +print("Jebb" if n % 10 == 0 else "Neibb") diff --git a/src/takkfyrirmig.py b/src/takkfyrirmig.py new file mode 100644 index 0000000..a146322 --- /dev/null +++ b/src/takkfyrirmig.py @@ -0,0 +1,3 @@ +n = int(input()) +for _ in range(n): + print(f"Takk {input()}") diff --git a/src/tilhamingju.py b/src/tilhamingju.py new file mode 100644 index 0000000..5a6a5a9 --- /dev/null +++ b/src/tilhamingju.py @@ -0,0 +1 @@ +print("TIL HAMINGJU MED AFMAELID FORRITUNARKEPPNI FRAMHALDSSKOLANNA!") diff --git a/src/toktik.py b/src/toktik.py new file mode 100644 index 0000000..85d96d6 --- /dev/null +++ b/src/toktik.py @@ -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]))