Skip to content

Commit 83a89ed

Browse files
committed
codeup 6098
1 parent 7415b45 commit 83a89ed

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

CodeUp/Python/6098.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
arr = [list(map(int, input().split())) for _ in range(10)]
2+
x = 1
3+
y = 1
4+
5+
while 1:
6+
arr[x][y] = 9
7+
if arr[x][y + 1] != 1: y += 1
8+
elif arr[x + 1][y] != 1: x += 1
9+
else: break
10+
if arr[x][y] == 2: break
11+
12+
arr[x][y] = 9
13+
14+
for i in range(10):
15+
for j in range(10):
16+
print(arr[i][j], end='' if j == 9 else ' ')
17+
print()

0 commit comments

Comments
 (0)