Arrays의 공식 문서
https://docs.oracle.com/javase/7/docs/api/java/util/Arrays.html
public String solution(int n, int[] arr){
String answer ="U";
Arrays.sort(arr);
for(int i=0;i<n-1;i++){
if(arr[i] == arr[i+1]){
return "D";
}
}
}
public class Main{
public String solution(int n, int[] arr){
String answer = "U";
Arrays.sort(arr);
for(int i=0;i<n-1;i++){
return "D";
}
}
return answer;
}
public static void main(String[] args){
Main47 T = new Main47();
Scanner kb = new Scanner(System.in);
int n = kb.nextInt();
int[] arr = new int[n];
for(int i=0;i<n;i++)
arr[i] = kb.nextInt();
System.out.println(T.solution(n, arr));
}
}