测试正常但是过不了
查看原帖
测试正常但是过不了
251237
Frozen_HC楼主2020/7/11 18:59

下载了数据测试明明是对的但是WA```python n = int(input()) a = [] b = [] for i in range(n): temp_list = [] temp = input() for j in temp: temp_list.append(j) a.append(temp_list) for i in range(n): temp_list = [] temp = input() for j in temp: temp_list.append(j) b.append(temp_list)

def A(z): x = 1 c = [[0 for i in range(n)] for j in range(n)] while x <= n: y = 1 while y <= n: c[y-1][n-x] = z[x-1][y-1] y += 1 x += 1 return c

def B(z): x = 1 c = [[0 for i in range(n)] for j in range(n)] while x <= n: y = 1 while y <= n: c[x-1][n-y] = z[x-1][y-1] y += 1 x += 1 return c

if A(a) == b: print(1) elif A(A(a)) == b: print(2) elif A(A(A(a))) == b: print(3) elif B(a) == b: print(4) elif A(B(a)) == b or A(A(B(a))) == b or A(A(A(B(a)))) == b: print(5) elif a == b: print(6) else: print(7)

2020/7/11 18:59
加载中...