From 3d21b7d91d346541c4c6f8a5470ba7448c45bad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=B3=D0=BE=D1=80=D1=8C?= Date: Wed, 1 Apr 2026 11:45:09 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D0=BC=D0=B0=D0=BB=D0=B5=D0=BD=D1=8C=D0=BA=D1=83=D1=8E?= =?UTF-8?q?=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- task1(2).py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/task1(2).py b/task1(2).py index 24180a7..494f902 100644 --- a/task1(2).py +++ b/task1(2).py @@ -34,9 +34,9 @@ def search_binary_diagonal(matrix, K): if pos < M and row[pos] == K: return True, steps - if diag_indx >= 0 and diag_idx < M: + if diag_indx >= 0 and diag_indx < M: steps += 1 - col_values = [matrix[i][diag_idx] for i in range(N)] + col_values = [matrix[i][diag_indx] for i in range(N)] pos = b.bisect_left(col_values, K) if pos < N and col_values[pos] == K: return True, steps