题解 | #牛牛的金币#

牛牛的金币

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

#include <stdio.h>

int main() {
    int x, y, x1, y1;
    scanf("%d%d%d%d", &x, &y, &x1, &y1);

    if (y1 - y == 1)
        printf("u");
    if (y1 - y == -1)
        printf("d");
    if (x1 - x == 1)
        printf("r");
    if (x1 - x == -1)
        printf("l");

    return 0;
}

全部评论

相关推荐

评论
1
收藏
分享

创作者周榜

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