게으른구름 2017. 10. 14. 22:17
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import java.util.*;
 
public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int[] Cmajor = new int[8];
        int[] a = {12345678};
        int[] b = {87654321};
        for(int i=0; i<8; i++) {
            Cmajor[i] = sc.nextInt();
        }
        if(Arrays.equals(Cmajor, a)) {
            System.out.println("ascending");
        }
        else if(Arrays.equals(Cmajor, b)) {
            System.out.println("descending");
        }
        else {
            System.out.println("mixed");
        }
    }
}
cs