diff --git a/src/drinkmenu.py b/src/drinkmenu.py new file mode 100644 index 0000000..ce8712a --- /dev/null +++ b/src/drinkmenu.py @@ -0,0 +1,9 @@ +from collections import Counter + +n, m = [int(d) for d in input().split()] +d = [input() for _ in range(n)] +c = Counter() +for _ in range(m): + name = input() + print(d[c[name] % n]) + c[name] += 1 diff --git a/src/equalshots.lua b/src/equalshots.lua new file mode 100644 index 0000000..6386e24 --- /dev/null +++ b/src/equalshots.lua @@ -0,0 +1,15 @@ +a, b = io.read("*n", "*n") +va, vb = 0, 0 +for _ = 1, a do + c, v = io.read("*n", "*n") + va = va + c * v +end +for _ = 1, b do + c, v = io.read("*n", "*n") + vb = vb + c * v +end +if va == vb then + print("same") +else + print("different") +end diff --git a/src/equalshots.py b/src/equalshots.py new file mode 100644 index 0000000..3788bc7 --- /dev/null +++ b/src/equalshots.py @@ -0,0 +1,9 @@ +a, b = [int(d) for d in input().split()] +va, vb = 0, 0 +for _ in range(a): + c, v = [int(d) for d in input().split()] + va += c * v +for _ in range(b): + c, v = [int(d) for d in input().split()] + vb += c * v +print("same" if va == vb else "different") diff --git a/src/ginfizz.py b/src/ginfizz.py new file mode 100644 index 0000000..137639c --- /dev/null +++ b/src/ginfizz.py @@ -0,0 +1,5 @@ +n = int(input()) +print(f"{45*n} ml gin") +print(f"{30*n} ml fresh lemon juice") +print(f"{10*n} ml simple syrup") +print(f'{n} slice{"s" if n>1 else ""} of lemon')