티스토리 뷰


1. Java 구현

          
import java.io.*;
import java.util.StringTokenizer;

public class Main {

	public static void main(String[] args) throws IOException {
		/* 2018.08.12 */
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
		StringTokenizer st = new StringTokenizer(br.readLine());
		
		String input = "";
		while(st.hasMoreTokens()) {
			input += st.nextToken();
		}
		
		if(input.equals("12345678")) bw.write("ascending");
		else if(input.equals("87654321")) bw.write("descending");
		else bw.write("mixed");
		
		bw.close();
		br.close();
	}
}

공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2025/01   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함