模拟 只需模拟两个起点 (0,0) (0,1) 方向都是UR,模拟过程中统计消除的块,回到起点或者碰到角落就结束模拟。 n,***p(int,input().strip().split()) D *= 2 # 角落 corner = set() corner.add((0,0)) corner.add((0,m)) corner.add((n,0)) corner.add((n,m)) # 起点,偏移量 def getRes(start,xc,yc): x,y = start t = 0 while True: # 走到撞墙为止 while 0 <= x+xc <= n and...