From 398fee74d6ff976d13a27bb0cfff179d85aad8d5 Mon Sep 17 00:00:00 2001 From: yenru0 Date: Mon, 29 Jul 2024 14:50:28 +0900 Subject: [PATCH] complete 26091.py --- zeta_python/completed/26091.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 zeta_python/completed/26091.py diff --git a/zeta_python/completed/26091.py b/zeta_python/completed/26091.py new file mode 100644 index 0000000..15276a1 --- /dev/null +++ b/zeta_python/completed/26091.py @@ -0,0 +1,15 @@ +if __name__ == "__main__": + N, M = map(int, input().split()) + A = list(map(int, input().split())) + A.sort() + start = 0 + end = N - 1 + cnt = 0 + while start < end: + if A[start] + A[end] >= M: + cnt += 1 + end -= 1 + start += 1 + else: + start += 1 + print(cnt)