페이지

2920번: 음계

https://www.acmicpc.net/problem/2920


$O(1)$


#include<cstdio>
int t, x;
int main() {
    while (~scanf("%d", &x)) t = t * 10 + x;
    puts(t == 12345678 ? "ascending" : t == 87654321 ? "descending" : "mixed");
    return 0;
}

댓글 없음 :

댓글 쓰기