From 348196d1fc510683e819d0dbdd9bdf6ab1d76b7c Mon Sep 17 00:00:00 2001 From: Zeheng Li Date: Tue, 20 Aug 2024 09:22:33 -0600 Subject: [PATCH] add examples --- src/bidendalausbid.py | 13 +++++++++++++ src/maetingarlisti.py | 8 ++++++++ src/skak.py | 6 ++++++ 3 files changed, 27 insertions(+) create mode 100644 src/bidendalausbid.py create mode 100644 src/maetingarlisti.py create mode 100644 src/skak.py diff --git a/src/bidendalausbid.py b/src/bidendalausbid.py new file mode 100644 index 00000000..bef33bea --- /dev/null +++ b/src/bidendalausbid.py @@ -0,0 +1,13 @@ +sh, sm = [int(d) for d in input().split(":")] +eh, em = [int(d) for d in input().split(":")] +dh, dm = 0, 0 +dh = eh - sh +if dh < 0: + dh += 24 +dm = em - sm +if dm < 0: + dm += 60 + dh -= 1 +if dh < 0: + dh += 24 +print(60 * dh + dm) diff --git a/src/maetingarlisti.py b/src/maetingarlisti.py new file mode 100644 index 00000000..7966b556 --- /dev/null +++ b/src/maetingarlisti.py @@ -0,0 +1,8 @@ +n, r, c = [int(d) for d in input().split()] +a = [input().split() for _ in range(r)] +for i in range(r): + b = [input() for _ in range(c)] + if a[i] == b: + print("left") + else: + print("right") diff --git a/src/skak.py b/src/skak.py new file mode 100644 index 00000000..9f564f2d --- /dev/null +++ b/src/skak.py @@ -0,0 +1,6 @@ +xh, yh = [int(d) for d in input().split()] +xp, yp = [int(d) for d in input().split()] +if xh == xp or yh == yp: + print(1) +else: + print(2)