题解 | #牛牛的金币#

牛牛的金币

http://www.nowcoder.com/practice/35d8e3e569dc49f2a1018d1dc9186998

BC67 牛牛的金币

思路:

step1:输入两点坐标;判断并输出结果;

代码如下:

x,y = list(map(int,input().split()))
x1,y1 = list(map(int,input().split()))
if (x-x1) == 1:
    print('l')
elif (x-x1) == -1:
    print('r')
elif (y-y1) == 1:
    print('d')
elif (y-y1) == -1:
    print('u')
全部评论

相关推荐

评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务