diff --git a/zeta_python/completed/10807.py b/zeta_python/completed/10807.py new file mode 100644 index 0000000..5acb796 --- /dev/null +++ b/zeta_python/completed/10807.py @@ -0,0 +1,8 @@ +N = int(input()) +L = list(map(int, input().split())) +v = int(input()) +c = 0 +for x in L: + if x == v: + c += 1 +print(c) \ No newline at end of file diff --git a/zeta_python/completed/10810.py b/zeta_python/completed/10810.py new file mode 100644 index 0000000..eb59b8a --- /dev/null +++ b/zeta_python/completed/10810.py @@ -0,0 +1,8 @@ +N, M = map(int, input().split()) +L = [0 for _ in range(N)] +for _ in range(M): + i, j, k = map(int, input().split()) + for m in range(i - 1, j): + L[m] = k + +print(" ".join(map(str, L))) diff --git a/zeta_python/completed/10811.py b/zeta_python/completed/10811.py new file mode 100644 index 0000000..fa7fbdc --- /dev/null +++ b/zeta_python/completed/10811.py @@ -0,0 +1,7 @@ +N, M = map(int, input().split()) +L = [i + 1 for i in range(N)] +for _ in range(M): + i, j = map(int, input().split()) + L[i - 1:j] = reversed(L[i - 1:j]) + +print(" ".join(map(str, L))) diff --git a/zeta_python/completed/10813.py b/zeta_python/completed/10813.py new file mode 100644 index 0000000..022a8ca --- /dev/null +++ b/zeta_python/completed/10813.py @@ -0,0 +1,14 @@ +N, M = map(int, input().split()) +L = [i for i in range(1, N + 1)] + + +def swap(i, j): + global L + L[i - 1], L[j - 1] = L[j - 1], L[i - 1] + + +for _ in range(M): + i, j = map(int, input().split()) + swap(i, j) + +print(" ".join(map(str, L))) diff --git a/zeta_python/completed/5597.py b/zeta_python/completed/5597.py new file mode 100644 index 0000000..a82cedf --- /dev/null +++ b/zeta_python/completed/5597.py @@ -0,0 +1,7 @@ +L = [i + 1 for i in range(30)] +for _ in range(28): + i = int(input()) - 1 + L[i] = False + +for i in L: + print(i) if i else 0