From c25c4048630ba8b84be2f43ac1f312a9e04cdd22 Mon Sep 17 00:00:00 2001 From: Aayush Jha Date: Fri, 17 Oct 2025 23:38:47 +0530 Subject: [PATCH] Create beautiful_matrix.py --- beautiful_matrix.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 beautiful_matrix.py diff --git a/beautiful_matrix.py b/beautiful_matrix.py new file mode 100644 index 00000000..ba41b1c1 --- /dev/null +++ b/beautiful_matrix.py @@ -0,0 +1,5 @@ +matrix = [list(map(int, input().split())) for _ in range(5)] +for i in range(5): + for j in range(5): + if matrix[i][j] == 1: + print(abs(i - 2) + abs(j - 2))