题解 | #牛牛的金币#
牛牛的金币
http://www.nowcoder.com/practice/35d8e3e569dc49f2a1018d1dc9186998
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int x=sc.nextInt(); int y=sc.nextInt(); int x1=sc.nextInt(); int y1=sc.nextInt(); if(y+1==y1&&x==x1){ System.out.print('u'); }else if(y-1==y1&&x==x1){ System.out.print('d'); }else if(x+1==x1&&y==y1){ System.out.print('r'); }else if(x-1==x1&&y==y1){ System.out.print('l'); } } }