diff --git a/src/midi.py b/src/midi.py new file mode 100644 index 0000000..698b1ff --- /dev/null +++ b/src/midi.py @@ -0,0 +1,5 @@ +n = int(input()) +parts = [] +for _ in range(n): + parts.append(input()) +print("".join(p[::-1] for p in parts[::-1])) diff --git a/src/numberfun.lua b/src/numberfun.lua new file mode 100644 index 0000000..2be0f81 --- /dev/null +++ b/src/numberfun.lua @@ -0,0 +1,8 @@ +for _ = 1, io.read("*n") do + a, b, c = io.read("*n", "*n", "*n") + if a + b == c or a * b == c or a - b == c or b - a == c or a == b * c or b == a * c then + print("Possible") + else + print("Impossible") + end +end diff --git a/src/offworldrecords.lua b/src/offworldrecords.lua new file mode 100644 index 0000000..b5bb2b9 --- /dev/null +++ b/src/offworldrecords.lua @@ -0,0 +1,10 @@ +n, c, p = io.read("*n", "*n", "*n") +ans = 0 +for _ = 1, n do + h = io.read("*n") + if h > c + p then + ans = ans + 1 + c, p = h, c + end +end +print(ans)