为啥没人用二维数组,很奇怪,宁外,有没有大佬帮我看看为啥不加2会报错
row,colomn = map(int,input().split())
a = [[0 for _ in range(0,row+2)]for _ in range(0,colomn+2) ]
for i in range(0,row):
a[i]=list(map(int,input().split()))
m,n=map(int,input().split())
print(a[m-1][n-1])
为啥没人用二维数组,很奇怪,宁外,有没有大佬帮我看看为啥不加2会报错
row,colomn = map(int,input().split())
a = [[0 for _ in range(0,row+2)]for _ in range(0,colomn+2) ]
for i in range(0,row):
a[i]=list(map(int,input().split()))
m,n=map(int,input().split())
print(a[m-1][n-1])