x1,y1 = map(int, input().split()) x2,y2 = map(int, input().split()) if x2 - x1 > 0 and y2 - y1 == 0: print('r') elif x2 - x1 < 0 and y2 - y1 == 0: print('l') elif x2 - x1 == 0 and y2 - y1 > 0: print('u') else: print('d') 写得麻烦一点,使用if else进行判断就行