Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
83801 胡海峰老师 同行列对角线的格 Python3 Wrong Answer 32 MS 3808 KB 606 2024-07-14 22:01:50

Tests(0/4):


Code:

n,i,j = map(int,input().split()) res =[] for col in range(1,5): res.append("({},{})".format(i,col)) res1 = " ".join(res) res.clear() for row in range(1,5): res.append("({},{})".format(row,j)) res2 = " ".join(res) res.clear() for x in range(1,5): for y in range(1,5): if x-y == i-j: res.append("({},{})".format(x, y)) res3 = " ".join(res) res.clear() for x in range(4,0,-1): for y in range(4,0,-1): if x+y == i+j: res.append("({},{})".format(x, y)) res4 = " ".join(res) print(res1) print(res2) print(res3) print(res4)


Run Info:

------Input------
10 8 1
------Answer-----
(8,1) (8,2) (8,3) (8,4) (8,5) (8,6) (8,7) (8,8) (8,9) (8,10) (1,1) (2,1) (3,1) (4,1) (5,1) (6,1) (7,1) (8,1) (9,1) (10,1) (8,1) (9,2) (10,3) (8,1) (7,2) (6,3) (5,4) (4,5) (3,6) (2,7) (1,8)
------Your output-----
(8,1) (8,2) (8,3) (8,4) (1,1) (2,1) (3,1) (4,1)