Note
의견: 0
The C major scale consists of 8 tones: c, d, e, f, g, a, h, C. For this task we number the notes using numbers \(1\) through \(8\).
The scale can be played ascending, from \(1\) to \(8\), descending, from \(8\) to \(1\), or mixed. Write a program that, given the sequence of notes, determines whether the scale was played ascending, descending or mixed.
The first and only line of input contains \(8\) integers, from \(1\) to \(8\) inclusive. Each integer appears exactly once in the input.
In the first and only line of input print "descending" if the scale was played
descending, "ascending" if the scale was played ascending and "mixed" if
the scale was played mixed.
| 서브태스크 | 점수 | 설명 |
|---|---|---|
Subtask 1 | 30점 |
1 2 3 4 5 6 7 8ascending8 7 6 5 4 3 2 1descending8 1 7 2 6 3 5 4mixed평가 및 의견
Note
Log in to rate problems.
아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.
풀이 제출
Note