From df5bdb1562916dfbab90f7680bce445b430fda1e Mon Sep 17 00:00:00 2001 From: Zeheng Li Date: Thu, 9 May 2024 11:48:21 -0600 Subject: [PATCH] add examples --- src/afjormun.py | 2 ++ src/bergur.py | 10 ++++++++++ src/cursethedarkness.py | 10 ++++++++++ 3 files changed, 22 insertions(+) create mode 100644 src/afjormun.py create mode 100644 src/bergur.py create mode 100644 src/cursethedarkness.py diff --git a/src/afjormun.py b/src/afjormun.py new file mode 100644 index 0000000..28e4237 --- /dev/null +++ b/src/afjormun.py @@ -0,0 +1,2 @@ +for _ in range(int(input())): + print(input().lower().capitalize()) diff --git a/src/bergur.py b/src/bergur.py new file mode 100644 index 0000000..043319d --- /dev/null +++ b/src/bergur.py @@ -0,0 +1,10 @@ +n = int(input()) +a = [int(d) for d in input().split()] +t = 0 +while True: + p = a.index(min(a)) + 1 + t += min(a[: p + 1]) * p + a = a[p:] + if not a: + break +print(t) diff --git a/src/cursethedarkness.py b/src/cursethedarkness.py new file mode 100644 index 0000000..5ef2c76 --- /dev/null +++ b/src/cursethedarkness.py @@ -0,0 +1,10 @@ +m = int(input()) +for _ in range(m): + bx, by = [float(d) for d in input().split()] + n = int(input()) + f = False + for _ in range(n): + cx, cy = [float(d) for d in input().split()] + if (bx - cx) ** 2 + (by - cy) ** 2 <= 64: + f = True + print("light a candle" if f else "curse the darkness")